Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ServiceModel;
- [ServiceContract]
- interface IService
- {
- [OperationContract]
- TimeSpan GetTimeSpan();
- }
- class Service : IService
- {
- public TimeSpan GetTimeSpan() { return DateTime.Now.TimeOfDay; }
- }
- using System;
- using System.ServiceModel;
- using System.Runtime.Serialization;
- [ServiceContract]
- interface IService
- {
- [OperationContract]
- Contract GetContract();
- }
- [DataContract]
- class Contract
- {
- [DataMember]
- public String MyProperty { get; set; }
- }
- class Service : IService
- {
- public Contract GetContract() { return new Contract(); }
- }
Add Comment
Please, Sign In to add comment