예제 #1
0
                private bool OnCreateSecurityProtocolComplete(SecurityProtocol securityProtocol)
                {
                    this.clientChannel.OnProtocolCreationComplete(securityProtocol);
                    IAsyncResult result = securityProtocol.BeginOpen(this.timeoutHelper.RemainingTime(), SecurityChannelFactory <TChannel> .ClientSecurityChannel <UChannel> .OpenAsyncResult.openSecurityProtocolCallback, this);

                    if (!result.CompletedSynchronously)
                    {
                        return(false);
                    }
                    securityProtocol.EndOpen(result);
                    return(this.OnSecurityProtocolOpenComplete());
                }
예제 #2
0
                private bool OnCreateSecurityProtocolComplete(SecurityProtocol securityProtocol)
                {
#if FEATURE_CORECLR
                    throw new NotImplementedException("SecurityProtocol.EndOpen is not supported in .NET Core");
#else
                    this.clientChannel.OnProtocolCreationComplete(securityProtocol);
                    IAsyncResult result = securityProtocol.BeginOpen(this.timeoutHelper.RemainingTime(), SecurityChannelFactory <TChannel> .ClientSecurityChannel <UChannel> .OpenAsyncResult.openSecurityProtocolCallback, (object)this);
                    if (!result.CompletedSynchronously)
                    {
                        return(false);
                    }
                    securityProtocol.EndOpen(result);
                    return(this.OnSecurityProtocolOpenComplete());
#endif
                }