Skip to content

Instantly share code, notes, and snippets.

@Datawalke
Created June 20, 2012 19:46
Show Gist options
  • Save Datawalke/2961797 to your computer and use it in GitHub Desktop.
Save Datawalke/2961797 to your computer and use it in GitHub Desktop.
[ServiceContract]
public interface IHello
{
[OperationContract]
void SayHello(string name);
}
[ServiceContract]
public interface IGoodbye
{
[OperationContract]
void SayGoodbye(string name);
}
public class GreetingService : IHello, IGoodbye // service implements both contracts
{
public void SayHello(string name)
{
Console.WriteLine("Hello {0}", name);
}
public void SayGoodbye(string name)
{
Console.WriteLine("Goodbye {0}", name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment