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
13 public sealed class AnnouncementClient
: ICommunicationObject
, IDisposable
15 public AnnouncementClient ()
19 public AnnouncementClient (AnnouncementEndpoint announcementEndpoint
)
23 public AnnouncementClient (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; }
31 public DiscoveryMessageSequenceGenerator MessageSequenceGenerator { get; set; }
33 CommunicationState ICommunicationObject
.State
{
34 get { return InnerChannel.State; }
37 public event EventHandler
<AsyncCompletedEventArgs
> AnnounceOfflineCompleted
;
38 public event EventHandler
<AsyncCompletedEventArgs
> AnnounceOnlineCompleted
;
40 event EventHandler ICommunicationObject
.Closed
{
41 add { InnerChannel.Closed += value; }
42 remove { InnerChannel.Closed -= value; }
44 event EventHandler ICommunicationObject
.Closing
{
45 add { InnerChannel.Closing += value; }
46 remove { InnerChannel.Closing -= value; }
48 event EventHandler ICommunicationObject
.Faulted
{
49 add { InnerChannel.Faulted += value; }
50 remove { InnerChannel.Faulted -= value; }
52 event EventHandler ICommunicationObject
.Opened
{
53 add { InnerChannel.Opened += value; }
54 remove { InnerChannel.Opened -= value; }
56 event EventHandler ICommunicationObject
.Opening
{
57 add { InnerChannel.Opening += value; }
58 remove { InnerChannel.Opening -= value; }
61 public void AnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata
)
63 throw new NotImplementedException ();
66 public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata
)
68 throw new NotImplementedException ();
71 public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata
, object userState
)
73 throw new NotImplementedException ();
76 public void AnnounceOnline (EndpointDiscoveryMetadata discoveryMetadata
)
78 throw new NotImplementedException ();
81 public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata
)
83 throw new NotImplementedException ();
86 public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata
, object userState
)
88 throw new NotImplementedException ();
91 public IAsyncResult
BeginAnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata
, AsyncCallback callback
, object state
)
93 throw new NotImplementedException ();
96 public IAsyncResult
BeginAnnounceOnline (EndpointDiscoveryMetadata discoveryMetadata
, AsyncCallback callback
, object state
)
98 throw new NotImplementedException ();
101 public void EndAnnounceOffline (IAsyncResult result
)
103 throw new NotImplementedException ();
106 public void EndAnnounceOnline (IAsyncResult result
)
108 throw new NotImplementedException ();
113 throw new NotImplementedException ();
118 throw new NotImplementedException ();
121 // explicit interface impl.
123 void ICommunicationObject
.Open ()
125 InnerChannel
.Open ();
128 void ICommunicationObject
.Open (TimeSpan timeout
)
130 InnerChannel
.Open (timeout
);
133 void ICommunicationObject
.Close ()
135 InnerChannel
.Close ();
138 void ICommunicationObject
.Close (TimeSpan timeout
)
140 InnerChannel
.Close (timeout
);
143 IAsyncResult ICommunicationObject
.BeginOpen (AsyncCallback callback
, object state
)
145 return InnerChannel
.BeginOpen (callback
, state
);
148 IAsyncResult ICommunicationObject
.BeginOpen (TimeSpan timeout
, AsyncCallback callback
, object state
)
150 return InnerChannel
.BeginOpen (timeout
, callback
, state
);
153 IAsyncResult ICommunicationObject
.BeginClose (AsyncCallback callback
, object state
)
155 return InnerChannel
.BeginClose (callback
, state
);
158 IAsyncResult ICommunicationObject
.BeginClose (TimeSpan timeout
, AsyncCallback callback
, object state
)
160 return InnerChannel
.BeginClose (timeout
, callback
, state
);
163 void ICommunicationObject
.EndOpen (IAsyncResult result
)
165 InnerChannel
.EndOpen (result
);
168 void ICommunicationObject
.EndClose (IAsyncResult result
)
170 InnerChannel
.EndClose (result
);
173 void ICommunicationObject
.Abort ()
175 InnerChannel
.Abort ();
178 void IDisposable
.Dispose ()
180 InnerChannel
.Dispose ();