Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Dynamic Binding Using the Factory Pattern

, 1 Nov 2009 CPOL
Using the Factory design pattern to hide dynamic binding and use configuration strings to determine which classes should be instantiated.
 * Copyright 2009 Richard (Rick) Marvin Wycoff, All Rights Reserved
 * NOTICE: You are permitted to use, modify, and distribute this file in 
 * accordance with the terms of the license agreement accompanying it.  
 * Any existing copyright or authorship information in any given source
 * file must remain intact.

using System.ServiceModel;

namespace Wycoff.Shared
    /// <summary>
    /// This is the shared interface.
    /// <remarks>
    /// The ServiceContract attribute is not generally required.  It is only
    /// included since this will also be used by a WCF service.
    /// </remarks>
    /// </summary>
    public interface ITheService
        /// <summary>
        /// A sample method
        /// </summary>
        /// <param name="name">
        /// The name to which the salutation should be addressed.
        /// </param>
        /// <returns>
        /// The personalized salutation.
        /// </returns>
        string Hello(string name);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Richard (Rick) Wycoff
Software Developer (Senior)
United States United States
Rick's software passion is developing "invisible” software components, the kind that no one ever thinks about because they just do what they are supposed to do. He believes in standards, design patterns, and designing components for extensibility and reuse.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150305.1 | Last Updated 1 Nov 2009
Article Copyright 2009 by Richard (Rick) Wycoff
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid