// 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);
             }
         }
     });
 }
        // Token: 0x0600000C RID: 12 RVA: 0x0000221C File Offset: 0x0000041C
        internal static byte[] LoopReadData(CrossAppDomainObjectBehavior.SingleReadAction readAction)
        {
            List <byte[]> list = new List <byte[]>(5000);

            byte[] array = new byte[5000];
            int    num;

            do
            {
                num = readAction(array, 0, 5000);
                if (num > 0)
                {
                    byte[] array2 = new byte[num];
                    Buffer.BlockCopy(array, 0, array2, 0, num);
                    list.Add(array2);
                }
            }while (num == 5000);
            return(CrossAppDomainObjectBehavior.MergeData(list));
        }
 // 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;
     }));
 }