Esempio n. 1
0
        public void Write(ByteArrayPart part)
        {
            ValidateCapacity(part.Length);

            System.Buffer.BlockCopy(part.Bytes, part.Offset, segment.Array, segment.Offset + end, part.Length);
            end += part.Length;
        }
Esempio n. 2
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, int part4)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
 }
Esempio n. 3
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, IPAddress part4)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
 }
Esempio n. 4
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, int part3, ByteArrayPart part4)
 {
     this.Write(part1);
     this.Write(part2);
     this.Write(part3);
     this.Write(part4);
 }
Esempio n. 5
0
        public void Remove(Base.Message.ByteArrayPart part)
        {
            string domainName = part.ToString();

            var account = accounts2.GetValue(domainName);

            if (account != null)
            {
                accounts1.Remove(account.Id);
                accounts2.Remove(account.DomainName);

                Account.Delete(files.GetFileName(account.Id));

                try
                {
                    var directory = files.GetAccountRootDirectory(account.Id);
                    if (directory != null)
                    {
                        System.IO.Directory.Delete(directory, true);
                    }
                }
                catch
                {
                }
            }
        }
Esempio n. 6
0
        public void WriteToTop(ByteArrayPart part, int ignoreAfter)
        {
            int num = (ignoreAfter > 0 && ignoreAfter < part.Length) ? ignoreAfter : part.Length;

            this.ValidateCapacityToTop(num);
            this.begin -= num;
            System.Buffer.BlockCopy(part.Bytes, part.Offset, this.segment.Array, this.segment.Offset + this.begin, num);
        }
Esempio n. 7
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, int part3, ByteArrayPart part4, ByteArrayPart part5, ByteArrayPart part6)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
     Write(part5);
     Write(part6);
 }
Esempio n. 8
0
        public void WriteToTop(ByteArrayPart part, int ignoreAfter)
        {
            int length = (ignoreAfter > 0 && ignoreAfter < part.Length) ? ignoreAfter : part.Length;

            ValidateCapacityToTop(length);

            begin -= length;
            System.Buffer.BlockCopy(part.Bytes, part.Offset, segment.Array, segment.Offset + begin, length);
        }
Esempio n. 9
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, int part4, ByteArrayPart part5, ByteArrayPart part6)
 {
     this.Write(part1);
     this.Write(part2);
     this.Write(part3);
     this.Write(part4);
     this.Write(part5);
     this.Write(part6);
 }
Esempio n. 10
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, ByteArrayPart part4, ByteArrayPart part5, ByteArrayPart part6, ByteArrayPart part7, ByteArrayPart part8)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
     Write(part5);
     Write(part6);
     Write(part7);
     Write(part8);
 }
Esempio n. 11
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, ByteArrayPart part4, ByteArrayPart part5, ByteArrayPart part6, ByteArrayPart part7, ByteArrayPart part8, ByteArrayPart part9)
 {
     this.Write(part1);
     this.Write(part2);
     this.Write(part3);
     this.Write(part4);
     this.Write(part5);
     this.Write(part6);
     this.Write(part7);
     this.Write(part8);
     this.Write(part9);
 }
Esempio n. 12
0
        public bool EndWith(ByteArrayPart part)
        {
            int length = part.Length;

            if (Length < length)
            {
                return(false);
            }

            for (int i = Begin + Length - part.Length, j = part.Begin; j < part.End; i++, j++)
            {
                if (Bytes[i] != part.Bytes[j])
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 13
0
 public bool Equals(ByteArrayPart y)
 {
     return(Equals(y.Bytes, y.Begin, y.Length));
 }
Esempio n. 14
0
 public void Write(ByteArrayPart part1, int part2)
 {
     Write(part1);
     Write(part2);
 }
Esempio n. 15
0
 public void WriteToTop(ByteArrayPart part)
 {
     WriteToTop(part, -1);
 }
Esempio n. 16
0
 public void Write(ByteArrayPart part1, int part2)
 {
     this.Write(part1);
     this.Write(part2);
 }