コード例 #1
0
        private byte[] ReadBinary(out BsonBinaryType binaryType)
        {
            int num = this.ReadInt32();

            binaryType = (BsonBinaryType)this.ReadByte();
            if ((byte)binaryType == 2 && !this._jsonNet35BinaryCompatibility)
            {
                num = this.ReadInt32();
            }
            return(this.ReadBytes(num));
        }
コード例 #2
0
        private byte[] ReadBinary()
        {
            int            count          = ReadInt32();
            BsonBinaryType bsonBinaryType = (BsonBinaryType)ReadByte();

            if (bsonBinaryType == BsonBinaryType.Data && !_jsonNet35BinaryCompatibility)
            {
                count = ReadInt32();
            }
            return(ReadBytes(count));
        }
コード例 #3
0
        private byte[] ReadBinary()
        {
            int            count          = this.ReadInt32();
            BsonBinaryType bsonBinaryType = (BsonBinaryType)this.ReadByte();

            if (bsonBinaryType == BsonBinaryType.BinaryOld && !this._jsonNet35BinaryCompatibility)
            {
                count = this.ReadInt32();
            }
            return(this.ReadBytes(count));
        }
コード例 #4
0
        private byte[] ReadBinary()
        {
            int dataLength = ReadInt32();

            BsonBinaryType binaryType = (BsonBinaryType)ReadByte();

#pragma warning disable 612,618
            // the old binary type has the data length repeated in the data for some reason
            if (binaryType == BsonBinaryType.BinaryOld && !_jsonNet35BinaryCompatibility)
            {
                dataLength = ReadInt32();
            }
#pragma warning restore 612,618

            return(ReadBytes(dataLength));
        }
コード例 #5
0
		// Token: 0x060000D4 RID: 212
		// RVA: 0x00006448 File Offset: 0x00004648
		public BsonBinary(byte[] value, BsonBinaryType binaryType) : base(value, BsonType.Binary)
		{
			this.BinaryType = binaryType;
		}
コード例 #6
0
 public BsonBinary(byte[] value, BsonBinaryType binaryType)
     : base(value, BsonType.Binary)
 {
     BinaryType = binaryType;
 }
コード例 #7
0
ファイル: BsonReader.cs プロジェクト: JamesNK/Newtonsoft.Json
        private byte[] ReadBinary(out BsonBinaryType binaryType)
        {
            int dataLength = ReadInt32();

            binaryType = (BsonBinaryType)ReadByte();

#pragma warning disable 612,618
            // the old binary type has the data length repeated in the data for some reason
            if (binaryType == BsonBinaryType.BinaryOld && !_jsonNet35BinaryCompatibility)
            {
                dataLength = ReadInt32();
            }
#pragma warning restore 612,618

            return ReadBytes(dataLength);
        }
コード例 #8
0
 public BsonBinary(byte[] value, BsonBinaryType binaryType)
     : base((object)value, BsonType.Binary)
 {
     this.BinaryType = binaryType;
 }
コード例 #9
0
ファイル: BsonBinary.cs プロジェクト: yunxuan0123/Piggy2
 public BsonBinary(byte[] value, BsonBinaryType binaryType)
 {
     Class6.yDnXvgqzyB5jw();
     base(value, BsonType.Binary);
     this.BinaryType = binaryType;
 }
コード例 #10
0
 // Token: 0x060000AB RID: 171
 // RVA: 0x00029E28 File Offset: 0x00028028
 private byte[] ReadBinary(out BsonBinaryType binaryType)
 {
     int count = this.ReadInt32();
     binaryType = (BsonBinaryType)this.ReadByte();
     if (binaryType == BsonBinaryType.BinaryOld && !this._jsonNet35BinaryCompatibility)
     {
         count = this.ReadInt32();
     }
     return this.ReadBytes(count);
 }