Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created February 27, 2019 12:36
Show Gist options
  • Save PatrickKalkman/ca8e3ab3929ba5177dac41213d6cbe75 to your computer and use it in GitHub Desktop.
Save PatrickKalkman/ca8e3ab3929ba5177dac41213d6cbe75 to your computer and use it in GitHub Desktop.
WCF Server
Server singleServerInstance = new Server();
Uri baseUri = new Uri(Configuration.CreateServerUriString());
ServiceHost serviceHost = new ServiceHost(singleServerInstance, baseUri);
serviceHost.AddServiceEndpoint(typeof(IMessageSender), Configuration.CreateBinding(), baseUri);
serviceHost.Open();
Console.ReadLine();
serviceHost.Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment