Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created February 27, 2019 12:35
Show Gist options
  • Save PatrickKalkman/ee144cd6d6a394718751de0e0eafc467 to your computer and use it in GitHub Desktop.
Save PatrickKalkman/ee144cd6d6a394718751de0e0eafc467 to your computer and use it in GitHub Desktop.
WCF client
EndpointAddress endpointAddress = new EndpointAddress(Configuration.CreateServerUriString());
ChannelFactory<IMessageSender> channelFactory = new ChannelFactory<IMessageSender>(Configuration.CreateBinding(), endpointAddress);
IMessageSender messageSender = channelFactory.CreateChannel(endpointAddress);
messageSender.ShowMessage("Test message");
((IChannel)messageSender).Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment