示例#1
0
 public byte[] GetBytes()
 {
     byte[] Data   = new byte[this.Length + 3];
     byte[] Header = Base64Encoding.Encodeuint(this.MessageId, 2);
     Data[0] = Header[0];
     Data[1] = Header[1];
     for (int i = 0; i < this.Length; i++)
     {
         Data[i + 2] = this.Body[i];
     }
     Data[Data.Length - 1] = 1;
     return(Data);
 }
示例#2
0
 public byte[] GetBytes()
 {
     byte[] buffer  = new byte[this.Length + 3];
     byte[] buffer2 = Base64Encoding.Encodeuint(this.MessageId, 2);
     buffer[0] = buffer2[0];
     buffer[1] = buffer2[1];
     for (int i = 0; i < this.Length; i++)
     {
         buffer[i + 2] = this.Body[i];
     }
     buffer[buffer.Length - 1] = 1;
     return(buffer);
 }
 public byte[] GetBytes()
 {
     byte[] numArray1 = new byte[this.Length + 3];
     byte[] numArray2 = Base64Encoding.Encodeuint(this.MessageId, 2);
     numArray1[0] = numArray2[0];
     numArray1[1] = numArray2[1];
     for (int index = 0; index < this.Length; ++index)
     {
         numArray1[index + 2] = this.Body[index];
     }
     numArray1[numArray1.Length - 1] = (byte)1;
     return(numArray1);
 }
示例#4
0
 public override byte[] GetBytes()
 {
     byte[] Data   = new byte[this.GetLenght() + 3];
     byte[] Header = Base64Encoding.Encodeuint(this.ID, 2);
     Data[0] = Header[0];
     Data[1] = Header[1];
     for (int i = 0; i < this.GetLenght(); i++)
     {
         Data[i + 2] = this.Data[i];
     }
     Data[Data.Length - 1] = 1;
     return(Data);
 }
示例#5
0
        internal byte[] GetBytes()
        {
            byte[] Data     = new byte[Length + 3];
            byte[] Header   = Base64Encoding.Encodeuint(MessageId, 2);
            byte[] realData = Body.ToArray();
            Data[0] = Header[0];
            Data[1] = Header[1];

            for (int i = 0; i < Length; i++)
            {
                Data[i + 2] = realData[i];
            }

            Data[Data.Length - 1] = 1;

            return(Data);
        }
示例#6
0
        public byte[] GetBytes()
        {
            byte[] Data     = new byte[contentLength + 3];
            byte[] Header   = Base64Encoding.Encodeuint(ID, 2);
            byte[] realData = Body.ToArray();
            Data[0] = Header[0];
            Data[1] = Header[1];

            for (int i = 0; i < contentLength; i++)
            {
                Data[i + 2] = realData[i];
            }

            Data[Data.Length - 1] = 1;

            return(Data);
        }
示例#7
0
        public byte[] GetBytes()
        {
            byte[] Data = new byte[contentLength + 2 + 1];

            byte[] Header = Base64Encoding.Encodeuint(mID, 2);
            Data[0] = Header[0];
            Data[1] = Header[1];

            for (int i = 0; i < this.contentLength; i++)
            {
                Data[i + 2] = mContent[i];
            }

            Data[Data.Length - 1] = 1;

            return(Data);
        }
示例#8
0
 public override string GetHeader()
 {
     return(Encoding.Default.GetString(Base64Encoding.Encodeuint(this.ID, 2)));
 }
示例#9
0
 /// <summary>
 /// Gets the header of this message, by Base64 encoding the message ID to a 2 byte string.
 /// </summary>
 public string GetHeader()
 {
     return(AleedaEnvironment.GetDefaultEncoding().GetString(Base64Encoding.Encodeuint(fID, 2)));
 }