protected override IAsyncResult BeginSendProxyAnnouncement(
     IDiscoveryResponseContractCD1 responseChannel,
     DiscoveryMessageSequence discoveryMessageSequence,
     EndpointDiscoveryMetadata proxyEndpointDiscoveryMetadata,
     AsyncCallback callback,
     object state)
 {
     return(responseChannel.BeginHelloOperation(
                HelloMessageCD1.Create(
                    discoveryMessageSequence,
                    proxyEndpointDiscoveryMetadata),
                callback,
                state));
 }
        public void HelloOperationAsync(EndpointDiscoveryMetadata endpointDiscoveryMetadata, object userState)
        {
            HelloMessageCD1 message = HelloMessageCD1.Create(DiscoveryMessageSequenceGenerator.Next(), endpointDiscoveryMetadata);

            if ((this.onBeginHelloOperationDelegate == null))
            {
                this.onBeginHelloOperationDelegate = new BeginOperationDelegate(this.OnBeginHelloOperation);
            }
            if ((this.onEndHelloOperationDelegate == null))
            {
                this.onEndHelloOperationDelegate = new EndOperationDelegate(this.OnEndHelloOperation);
            }
            if ((this.onHelloOperationCompletedDelegate == null))
            {
                this.onHelloOperationCompletedDelegate = Fx.ThunkCallback(new SendOrPostCallback(this.OnHelloOperationCompleted));
            }
            base.InvokeAsync(
                this.onBeginHelloOperationDelegate,
                new object[] { message },
                this.onEndHelloOperationDelegate,
                this.onHelloOperationCompletedDelegate,
                userState);
        }
        public IAsyncResult BeginHelloOperation(EndpointDiscoveryMetadata endpointDiscoveryMetadata, AsyncCallback callback, object state)
        {
            HelloMessageCD1 message = HelloMessageCD1.Create(DiscoveryMessageSequenceGenerator.Next(), endpointDiscoveryMetadata);

            return(base.Channel.BeginHelloOperation(message, callback, state));
        }
        public void HelloOperation(EndpointDiscoveryMetadata endpointDiscoveryMetadata)
        {
            HelloMessageCD1 message = HelloMessageCD1.Create(DiscoveryMessageSequenceGenerator.Next(), endpointDiscoveryMetadata);

            base.Channel.HelloOperation(message);
        }