Created
June 20, 2012 19:46
-
-
Save Datawalke/2961797 to your computer and use it in GitHub Desktop.
This file contains 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
[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