public FabricTransportCallbackClient GetCallbackClient()

        {
            if (this.callbackClient == null)
            {
                this.callbackClient = this.callback(this.clientId);
            }

            return(this.callbackClient);
        }
示例#2
0
        public NativeCommon.IFabricAsyncOperationContext BeginProcessConnect(
            NativeFabricTransport.IFabricTransportClientConnection nativeClientConnection,
            uint timeoutMilliseconds,
            NativeCommon.IFabricAsyncOperationCallback callback)
        {
            var clientConnectionmanagedTimeout = TimeSpan.FromMilliseconds(timeoutMilliseconds);
            var clientConnection = new FabricTransportCallbackClient(nativeClientConnection);

            AppTrace.TraceSource.WriteInfo("FabricTransportConnectionHandlerBroker", "Client {0} Connecting", clientConnection.GetClientId());
            return
                (Utility.WrapNativeAsyncMethodImplementation(
                     (cancellationToken) => this.connectionHandler.ConnectAsync(clientConnection, clientConnectionmanagedTimeout),
                     callback,
                     "IFabricTransportConnectionHandler.ConnectAsync"));
        }