Пример #1
0
 protected override IAsyncResult BeginSendProxyAnnouncement(
     IDiscoveryResponseContract11 responseChannel,
     DiscoveryMessageSequence discoveryMessageSequence,
     EndpointDiscoveryMetadata proxyEndpointDiscoveryMetadata,
     AsyncCallback callback,
     object state)
 {
     return(responseChannel.BeginHelloOperation(
                HelloMessage11.Create(
                    discoveryMessageSequence,
                    proxyEndpointDiscoveryMetadata),
                callback,
                state));
 }
        public IAsyncResult BeginHelloOperation(HelloMessage11 message, AsyncCallback callback, object state)
        {
            Fx.Assert(message != null, "The message cannot be null.");
            if ((message.MessageSequence != null) && (message.Hello != null))
            {
                this.responseReceiver.HelloOperation(
                    OperationContext.Current.IncomingMessageHeaders.RelatesTo,
                    message.MessageSequence.ToDiscoveryMessageSequence(),
                    message.Hello.ToEndpointDiscoveryMetadata());
            }
            else
            {
                if (TD.DiscoveryMessageWithNullMessageSequenceIsEnabled() && message.MessageSequence == null)
                {
                    TD.DiscoveryMessageWithNullMessageSequence(
                        ProtocolStrings.TracingStrings.Hello,
                        OperationContext.Current.IncomingMessageHeaders.MessageId.ToString());
                }
            }

            return(new CompletedAsyncResult(callback, state));
        }
Пример #3
0
        public void HelloOperationAsync(EndpointDiscoveryMetadata endpointDiscoveryMetadata, object userState)
        {
            HelloMessage11 message = HelloMessage11.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);
        }
Пример #4
0
 IAsyncResult IAnnouncementContract11.BeginHelloOperation(HelloMessage11 message, AsyncCallback callback, object state)
 {
     return new HelloOperation11AsyncResult(this, message, callback, state);
 }
Пример #5
0
 void IAnnouncementContract11.HelloOperation(HelloMessage11 message)
 {
     Fx.Assert("The sync method IAnnouncementContract11.HelloOperation must not get invoked. It is marked with PreferAsyncInvocation flag.");
 }
Пример #6
0
        IAsyncResult OnBeginHelloOperation(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            HelloMessage11 message = ((HelloMessage11)(inValues[0]));

            return(this.BeginHelloOperation(message, callback, asyncState));
        }
Пример #7
0
 IAsyncResult BeginHelloOperation(HelloMessage11 message, AsyncCallback callback, object state)
 {
     return(base.Channel.BeginHelloOperation(message, callback, state));
 }
Пример #8
0
        public IAsyncResult BeginHelloOperation(EndpointDiscoveryMetadata endpointDiscoveryMetadata, AsyncCallback callback, object state)
        {
            HelloMessage11 message = HelloMessage11.Create(DiscoveryMessageSequenceGenerator.Next(), endpointDiscoveryMetadata);

            return(base.Channel.BeginHelloOperation(message, callback, state));
        }
Пример #9
0
        public void HelloOperation(EndpointDiscoveryMetadata endpointDiscoveryMetadata)
        {
            HelloMessage11 message = HelloMessage11.Create(DiscoveryMessageSequenceGenerator.Next(), endpointDiscoveryMetadata);

            base.Channel.HelloOperation(message);
        }