internal NativeCommon.IFabricAsyncOperationContext BeginRequest(
            byte[] headers,
            byte[] body,
            TimeSpan timeout,
            NativeCommon.IFabricAsyncOperationCallback callback)
        {
            NativeServiceCommunication.IFabricServiceCommunicationMessage message = new FabricServiceCommunicationMessage(headers, body);
            var nativeTimeout = Utility.ToMilliseconds(timeout, "timeout");

            return(this.nativeClientConnection.BeginRequest(message, nativeTimeout, callback));
        }
Пример #2
0
 private NativeCommon.IFabricAsyncOperationContext BeginRequest(
     byte[] headers,
     byte[] body,
     TimeSpan timeout,
     NativeCommon.IFabricAsyncOperationCallback callback)
 {
     using (var pin = new PinCollection())
     {
         var timeoutInMilliSeconds = Utility.ToMilliseconds(timeout, "timeout");
         NativeServiceCommunication.IFabricServiceCommunicationMessage message =
             new FabricServiceCommunicationMessage(headers, body);
         return(this.nativeClient.BeginRequest(message, timeoutInMilliSeconds, callback));
     }
 }
 public void OneWayMessage(byte[] messageHeaders, byte[] requestBody)
 {
     NativeServiceCommunication.IFabricServiceCommunicationMessage message = new FabricServiceCommunicationMessage(messageHeaders, requestBody);
     Utility.WrapNativeSyncInvokeInMTA(() => this.nativeClientConnection.SendMessage(message), "NativeFabricClientConnection.SendMessage");
 }
Пример #4
0
 public virtual void SendOneWay(byte[] header, byte[] requestBody)
 {
     NativeServiceCommunication.IFabricServiceCommunicationMessage message =
         new FabricServiceCommunicationMessage(header, requestBody);
     this.nativeClient.SendMessage(message);
 }