// Token: 0x06000018 RID: 24 RVA: 0x0000256C File Offset: 0x0000076C
 internal CrossAppDomainPrimaryObjectBehavior(string namedPipeName, BehaviorDirection direction, CrossAppDomainPrimaryObjectBehavior.OnMessageReceived onMessagereceived) : base(namedPipeName, direction)
 {
     CrossAppDomainPrimaryObjectBehavior < > 4__this = this;
     CoreLogger.ExecuteAndLog("CrossAppDomainPrimaryObjectBehavior.Ctor", true, null, null, delegate()
     {
         if (direction == BehaviorDirection.In)
         {
             < > 4__this.onMessageReceived    = onMessagereceived;
 // Token: 0x06000016 RID: 22 RVA: 0x00002464 File Offset: 0x00000664
 internal void SendMessage(byte[] message)
 {
     CoreLogger.ExecuteAndLog("CrossAppDomainPassiveObjectBehavior.ReceiveMessage", true, null, null, delegate()
     {
         using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", this.NamedPipeName, PipeDirection.Out))
         {
             if (CrossAppDomainObjectBehavior.ConnectClientStream(namedPipeClientStream, 1000, this.NamedPipeName, false))
             {
                 namedPipeClientStream.Write(message, 0, message.Length);
             }
         }
     });
 }
示例#3
0
 public WinRMDataSender(HttpContext context, LatencyTracker latencyTracker)
 {
     WinRMDataSender < > 4__this = this;
     CoreLogger.ExecuteAndLog("WinRMDataSender.Ctor", true, null, null, delegate()
     {
         if (!WinRMDataExchangeHelper.IsExchangeDataUseAuthenticationType() && !WinRMDataExchangeHelper.IsExchangeDataUseNamedPipe())
         {
             throw new InvalidFlightingException();
         }
         if (context.User == null || context.User.Identity == null)
         {
             throw new ArgumentException("context.User and context.User.Identity should not be null.");
         }
         < > 4__this.httpContext    = context;
示例#4
0
 // Token: 0x06000080 RID: 128 RVA: 0x00004400 File Offset: 0x00002600
 public WinRMDataReceiver(string connectionUrl, string userName, string authenticationType, LatencyTracker latencyTracker)
 {
     WinRMDataReceiver < > 4__this = this;
     if (!WinRMDataExchangeHelper.IsExchangeDataUseAuthenticationType() && !WinRMDataExchangeHelper.IsExchangeDataUseNamedPipe())
     {
         throw new InvalidFlightingException();
     }
     CoreLogger.ExecuteAndLog("WinRMDataReceiver.Ctor", true, latencyTracker, delegate(Exception ex)
     {
         AuthZLogger.SafeAppendGenericError("WinRMDataReceiver.Ctor", ex.ToString(), false);
     }, delegate()
     {
         < > 4__this.latencyTracker = latencyTracker;
         if (WinRMDataExchangeHelper.IsExchangeDataUseAuthenticationType())
         {
             WinRMDataExchangeHelper.DehydrateAuthenticationType(authenticationType, out < > 4__this.authenticationType, out < > 4__this.serializedData);
         }
         else
         {
 // Token: 0x06000015 RID: 21 RVA: 0x000023C4 File Offset: 0x000005C4
 internal IEnumerable <string> RecieveMessages()
 {
     return(CoreLogger.ExecuteAndLog <IEnumerable <string> >("CrossAppDomainPassiveObjectBehavior.ReceiveMessage", true, null, null, null, delegate()
     {
         IEnumerable <string> result;
         using (NamedPipeClientStream clientStream = new NamedPipeClientStream(".", base.NamedPipeName, PipeDirection.In))
         {
             CrossAppDomainObjectBehavior.ConnectClientStream(clientStream, 1000, base.NamedPipeName, false);
             byte[] array = CrossAppDomainObjectBehavior.LoopReadData((byte[] buffer, int offset, int count) => clientStream.Read(buffer, offset, count));
             if (array == null || array.Length == 0)
             {
                 result = null;
             }
             else
             {
                 result = CrossAppDomainObjectBehavior.UnpackMessages(array);
             }
         }
         return result;
     }));
 }