Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WcfClient<T> : ClientBase<T> where T : class
- {
- public new T Channel {get {return base.Channel;}}
- }
- using(var client = new WcfClient<IFoo>())
- {
- client.Channel.Bar(); // defined by IFoo
- }
- public class WcfClient<T> : ClientBase<T>, IDisposable where T : class
- {
- public new T Channel {get {return base.Channel;}}
- void IDisposable.Dispose() {
- try {
- switch(State) {
- case CommunicationState.Open: Close(); break;
- // etc
- }
- } catch {} // swallow it down (perhaps log it first)
- }
- }
Add Comment
Please, Sign In to add comment