示例#1
0
        public static CommandRecord FromBson(BsonDocument doc)
        {
            var commandDocument = doc.GetBsonDocument("Command");

            var record = new CommandRecord
            {
                CommandDocument = commandDocument,
                Metadata        = CommandMetadata.FromBson(commandDocument.GetBsonDocument("Metadata")),
                Handlers        = CommandHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers"))
            };

            return(record);
        }