Esempio n. 1
0
        public static EventRecord FromBson(BsonDocument doc)
        {
            var eventDocument = doc.GetBsonDocument("Event");
            var record        = new EventRecord()
            {
                EventDocument = eventDocument,
                Metadata      = EventMetadata.FromBson(eventDocument.GetBsonDocument("Metadata")),
                Handlers      = EventHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers"))
            };

            return(record);
        }
Esempio n. 2
0
        public static EventRecord FromBson(BsonDocument doc)
        {
            var eventDocument = doc.GetBsonDocument("Event");
            var record = new EventRecord()
            {
                EventDocument = eventDocument,
                Metadata = EventMetadata.FromBson(eventDocument.GetBsonDocument("Metadata")),
                Handlers = EventHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers"))
            };

            return record;
        }  
Esempio n. 3
0
        public static CommandRecord FromBson(BsonDocument doc)
        {
            var commandDocument = doc.GetBsonDocument("Command");

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

            return(record);
        }
Esempio n. 4
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;
        }