Created
August 13, 2010 02:20
-
-
Save kkozmic/522140 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IServiceHostBuilder | |
{ | |
ServiceHostModel Build(); | |
} | |
public abstract class ServiceModelBuilder<TService> :IServiceHostBuilder | |
{ | |
// goo | |
} | |
public class EchoServiceBuilder:ServiceModelBuilder<EchoService> | |
{ | |
public EchoServiceBuilder() | |
{ | |
// could potentially take some "context" as parameter | |
Expose<IEcho>( e => e.At<BasicHttpBinding>("http://MySite.com")); // Binding should be optional and by default inferred from the address eg http:// -> Basic Http | |
ExposeMex("http://MySite.com/mex"); | |
Expose<IEcho2>(e=>e.At<SomeOtherBinding>("http://MySite.com/2" b=>b.SomeBindingConfiguration())); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment