WriteStartConstructor() 공개 메소드

Writes the start of a constructor with the given name.
public WriteStartConstructor ( string name ) : void
name string The name of the constructor.
리턴 void
        public void WriteConstructor()
        {
            ExceptionAssert.Throws<JsonWriterException>(() =>
            {
                MemoryStream ms = new MemoryStream();
                BsonWriter writer = new BsonWriter(ms);

                writer.WriteStartArray();
                writer.WriteStartConstructor("fail");
            }, "Cannot write JSON constructor as BSON. Path ''.");
        }
예제 #2
0
        public void WriteConstructor()
        {
            MemoryStream ms = new MemoryStream();
              BsonWriter writer = new BsonWriter(ms);

              writer.WriteStartArray();
              writer.WriteStartConstructor("fail");
        }