Skip to content

Instantly share code, notes, and snippets.

@kkozmic
Created August 13, 2010 02:20
Show Gist options
  • Save kkozmic/522140 to your computer and use it in GitHub Desktop.
Save kkozmic/522140 to your computer and use it in GitHub Desktop.
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