2010-06-21 Marek Habersack <mhabersack@novell.com>
[mcs.git] / class / System.ServiceModel.Discovery / System.ServiceModel.Discovery / DiscoveryClient.cs
blobb454c530f798861278b9f4e9642805d3f076bb22
1 using System;
2 using System.Collections.Generic;
3 using System.Collections.ObjectModel;
4 using System.ComponentModel;
5 using System.ServiceModel;
6 using System.ServiceModel.Channels;
7 using System.ServiceModel.Description;
8 using System.ServiceModel.Dispatcher;
10 namespace System.ServiceModel.Discovery
12 [MonoTODO]
13 public sealed class DiscoveryClient : ICommunicationObject, IDisposable
15 public DiscoveryClient ()
19 public DiscoveryClient (DiscoveryEndpoint discoveryEndpoint)
23 public DiscoveryClient (string endpointConfigurationName)
27 public ChannelFactory ChannelFactory { get; private set; }
28 public ClientCredentials ClientCredentials { get; private set; }
29 public ServiceEndpoint Endpoint { get; private set; }
30 public IClientChannel InnerChannel { get; private set; }
32 CommunicationState ICommunicationObject.State {
33 get { return InnerChannel.State; }
36 public event EventHandler<FindCompletedEventArgs> FindCompleted;
37 public event EventHandler<FindProgressChangedEventArgs> FindProgressChanged;
38 public event EventHandler<AnnouncementEventArgs> ProxyAvailable;
39 public event EventHandler<ResolveCompletedEventArgs> ResolveCompleted;
41 event EventHandler ICommunicationObject.Closed {
42 add { InnerChannel.Closed += value; }
43 remove { InnerChannel.Closed -= value; }
45 event EventHandler ICommunicationObject.Closing {
46 add { InnerChannel.Closing += value; }
47 remove { InnerChannel.Closing -= value; }
49 event EventHandler ICommunicationObject.Faulted {
50 add { InnerChannel.Faulted += value; }
51 remove { InnerChannel.Faulted -= value; }
53 event EventHandler ICommunicationObject.Opened {
54 add { InnerChannel.Opened += value; }
55 remove { InnerChannel.Opened -= value; }
57 event EventHandler ICommunicationObject.Opening {
58 add { InnerChannel.Opening += value; }
59 remove { InnerChannel.Opening -= value; }
62 public void CancelAsync (object userState)
64 throw new NotImplementedException ();
67 public void Close ()
69 throw new NotImplementedException ();
72 public FindResponse Find (FindCriteria criteria)
74 throw new NotImplementedException ();
77 public void FindAsync (FindCriteria criteria)
79 throw new NotImplementedException ();
82 public void FindAsync (FindCriteria criteria, object userState)
84 throw new NotImplementedException ();
87 public void Open ()
89 throw new NotImplementedException ();
92 public ResolveResponse Resolve (ResolveCriteria criteria)
94 throw new NotImplementedException ();
97 public void ResolveAsync (ResolveCriteria criteria)
99 throw new NotImplementedException ();
102 public void ResolveAsync (ResolveCriteria criteria, object userState)
104 throw new NotImplementedException ();
107 // explicit interface impl.
109 void ICommunicationObject.Open ()
111 InnerChannel.Open ();
114 void ICommunicationObject.Open (TimeSpan timeout)
116 InnerChannel.Open (timeout);
119 void ICommunicationObject.Close ()
121 InnerChannel.Close ();
124 void ICommunicationObject.Close (TimeSpan timeout)
126 InnerChannel.Close (timeout);
129 IAsyncResult ICommunicationObject.BeginOpen (AsyncCallback callback, object state)
131 return InnerChannel.BeginOpen (callback, state);
134 IAsyncResult ICommunicationObject.BeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
136 return InnerChannel.BeginOpen (timeout, callback, state);
139 IAsyncResult ICommunicationObject.BeginClose (AsyncCallback callback, object state)
141 return InnerChannel.BeginClose (callback, state);
144 IAsyncResult ICommunicationObject.BeginClose (TimeSpan timeout, AsyncCallback callback, object state)
146 return InnerChannel.BeginClose (timeout, callback, state);
149 void ICommunicationObject.EndOpen (IAsyncResult result)
151 InnerChannel.EndOpen (result);
154 void ICommunicationObject.EndClose (IAsyncResult result)
156 InnerChannel.EndClose (result);
159 void ICommunicationObject.Abort ()
161 InnerChannel.Abort ();
164 void IDisposable.Dispose ()
166 InnerChannel.Dispose ();