Пример #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;
        }
Пример #2
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, int part4)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
 }
Пример #3
0
 public void Write(ByteArrayPart part1, ByteArrayPart part2, ByteArrayPart part3, IPAddress part4)
 {
     Write(part1);
     Write(part2);
     Write(part3);
     Write(part4);
 }
Пример #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);
 }
Пример #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
                {
                }
            }
        }
Пример #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);
        }
Пример #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);
 }
Пример #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);
        }
Пример #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);
 }
Пример #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);
 }
Пример #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);
 }
Пример #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);
        }
Пример #13
0
 public bool Equals(ByteArrayPart y)
 {
     return(Equals(y.Bytes, y.Begin, y.Length));
 }
Пример #14
0
 public void Write(ByteArrayPart part1, int part2)
 {
     Write(part1);
     Write(part2);
 }
Пример #15
0
 public void WriteToTop(ByteArrayPart part)
 {
     WriteToTop(part, -1);
 }
Пример #16
0
 public void Write(ByteArrayPart part1, int part2)
 {
     this.Write(part1);
     this.Write(part2);
 }