Example #1
0
 public override void WriteValue(ulong value)
 {
     if (value > 0x7fffffffffffffffL)
     {
         throw JsonWriterException.smethod_1(this, "Value is too large to fit in a signed 64 bit integer. BSON does not support unsigned values.", null);
     }
     base.WriteValue(value);
     this.method_22(value, Enum11.Long);
 }
Example #2
0
 public void WriteObjectId(byte[] value)
 {
     Class203.smethod_2(value, "value");
     if (value.Length != 12)
     {
         throw JsonWriterException.smethod_1(this, "An object id must be 12 bytes", null);
     }
     base.method_0();
     base.method_11(JsonToken.Undefined);
     this.method_22(value, Enum11.Oid);
 }
Example #3
0
 internal void method_23(Class70 class70_2)
 {
     if (this.class70_1 != null)
     {
         if (this.class70_1 is Class71)
         {
             ((Class71)this.class70_1).method_0(this.string_1, class70_2);
             this.string_1 = null;
         }
         else
         {
             ((Class72)this.class70_1).method_0(class70_2);
         }
     }
     else
     {
         if ((class70_2.Enum11_0 != Enum11.Object) && (class70_2.Enum11_0 != Enum11.Array))
         {
             throw JsonWriterException.smethod_1(this, "Error writing {0} value. BSON must start with an Object or Array.".smethod_0(CultureInfo.InvariantCulture, class70_2.Enum11_0), null);
         }
         this.class70_1 = class70_2;
         this.class70_0 = class70_2;
     }
 }
Example #4
0
 public override void WriteComment(string text)
 {
     throw JsonWriterException.smethod_1(this, "Cannot write JSON comment as BSON.", null);
 }
Example #5
0
 public override void WriteStartConstructor(string name)
 {
     throw JsonWriterException.smethod_1(this, "Cannot write JSON constructor as BSON.", null);
 }
Example #6
0
 public override void WriteRawValue(string json)
 {
     throw JsonWriterException.smethod_1(this, "Cannot write raw JSON as BSON.", null);
 }