public async System.Threading.Tasks.Task <DocumentDbTests.Metadata.MyTrackedDoc> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            DocumentDbTests.Metadata.MyTrackedDoc document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Metadata.MyTrackedDoc>(reader, 0, token).ConfigureAwait(false);

            if (!(await reader.IsDBNullAsync(1, token).ConfigureAwait(false)))
            {
                var correlationId = await reader.GetFieldValueAsync <string>(1, token).ConfigureAwait(false);

                document.CorrelationId = correlationId;
            }
            if (!(await reader.IsDBNullAsync(2, token).ConfigureAwait(false)))
            {
                var causationId = await reader.GetFieldValueAsync <string>(2, token).ConfigureAwait(false);

                document.CausationId = causationId;
            }
            if (!(await reader.IsDBNullAsync(3, token).ConfigureAwait(false)))
            {
                var lastModifiedBy = await reader.GetFieldValueAsync <string>(3, token).ConfigureAwait(false);

                document.LastModifiedBy = lastModifiedBy;
            }
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Metadata.MyTrackedDoc> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Metadata.MyTrackedDoc document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Metadata.MyTrackedDoc>(reader, 1, token).ConfigureAwait(false);

            if (!(await reader.IsDBNullAsync(2, token).ConfigureAwait(false)))
            {
                var correlationId = await reader.GetFieldValueAsync <string>(2, token).ConfigureAwait(false);

                document.CorrelationId = correlationId;
            }
            if (!(await reader.IsDBNullAsync(3, token).ConfigureAwait(false)))
            {
                var causationId = await reader.GetFieldValueAsync <string>(3, token).ConfigureAwait(false);

                document.CausationId = causationId;
            }
            if (!(await reader.IsDBNullAsync(4, token).ConfigureAwait(false)))
            {
                var lastModifiedBy = await reader.GetFieldValueAsync <string>(4, token).ConfigureAwait(false);

                document.LastModifiedBy = lastModifiedBy;
            }
            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Concurrency.CoffeeShop> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Concurrency.CoffeeShop document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Concurrency.CoffeeShop>(reader, 1, token).ConfigureAwait(false);

            var version = await reader.GetFieldValueAsync <System.Guid>(2, token);

            _versions[id] = version;
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState document;
            document = await _serializer.FromJsonAsync <EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #5
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_834_querying_inside_of_child_collections.Contact> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Bugs.Bug_834_querying_inside_of_child_collections.Contact document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_834_querying_inside_of_child_collections.Contact>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <long>(0, token);

            DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #7
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Writing.document_inserts.RecordDocument> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Writing.document_inserts.RecordDocument document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Writing.document_inserts.RecordDocument>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Concurrency.CoffeeShopEmployee> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Concurrency.CoffeeShopEmployee document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Concurrency.CoffeeShopEmployee>(reader, 1, token).ConfigureAwait(false);

            var version = await reader.GetFieldValueAsync <System.Guid>(2, token);

            _versions[id] = version;
            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
Beispiel #12
0
        public async System.Threading.Tasks.Task <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate document;
            document = await _serializer.FromJsonAsync <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #13
0
        public async System.Threading.Tasks.Task <Marten.Testing.Documents.Issue> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            Marten.Testing.Documents.Issue document;
            document = await _serializer.FromJsonAsync <Marten.Testing.Documents.Issue>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #14
0
        public async System.Threading.Tasks.Task <EventSourcingTests.Projections.QuestParty> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            EventSourcingTests.Projections.QuestParty document;
            document = await _serializer.FromJsonAsync <EventSourcingTests.Projections.QuestParty>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #16
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #17
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Metadata.MyVersionedDoc> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            DocumentDbTests.Metadata.MyVersionedDoc document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Metadata.MyVersionedDoc>(reader, 0, token).ConfigureAwait(false);

            var version = await reader.GetFieldValueAsync <System.Guid>(1, token);

            document.Version = version;
            return(document);
        }
Beispiel #18
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <int>(0, token);

            DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #20
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > > ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > >(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #21
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Metadata.AttVersionedDoc> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <int>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Metadata.AttVersionedDoc document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Metadata.AttVersionedDoc>(reader, 1, token).ConfigureAwait(false);

            var version = await reader.GetFieldValueAsync <System.Guid>(2, token);

            _versions[id]    = version;
            document.Version = version;
            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
Beispiel #22
0
        public override async System.Threading.Tasks.Task <Marten.Events.StreamState> ResolveAsync(Marten.Internal.IMartenSession session, System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var streamState = new Marten.Events.StreamState();
            var id          = await reader.GetFieldValueAsync <System.Guid>(0, token).ConfigureAwait(false);

            streamState.Id = id;
            var version = await reader.GetFieldValueAsync <long>(1, token).ConfigureAwait(false);

            streamState.Version = version;
            await SetAggregateTypeAsync(streamState, reader, session, token);

            var lastTimestamp = await reader.GetFieldValueAsync <System.DateTimeOffset>(3, token).ConfigureAwait(false);

            streamState.LastTimestamp = lastTimestamp;
            var created = await reader.GetFieldValueAsync <System.DateTimeOffset>(4, token).ConfigureAwait(false);

            streamState.Created = created;
            var isArchived = await reader.GetFieldValueAsync <bool>(5, token).ConfigureAwait(false);

            streamState.IsArchived = isArchived;
            return(streamState);
        }
Beispiel #23
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.MyClass> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <string>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Bugs.MyClass document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.MyClass>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
Beispiel #25
0
        public async System.Threading.Tasks.Task <EventSourcingTests.Aggregation.RoomsAvailability> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            EventSourcingTests.Aggregation.RoomsAvailability document;
            document = await _serializer.FromJsonAsync <EventSourcingTests.Aggregation.RoomsAvailability>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
        public async System.Threading.Tasks.Task <Marten.Testing.Documents.UserWithoutIdSetter> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            Marten.Testing.Documents.UserWithoutIdSetter document;
            document = await _serializer.FromJsonAsync <Marten.Testing.Documents.UserWithoutIdSetter>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
        public async System.Threading.Tasks.Task <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity document;
            document = await _serializer.FromJsonAsync <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
Beispiel #28
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <int>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Deleting.delete_many_documents_by_query.FailureInLife>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
        public async System.Threading.Tasks.Task <DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
Beispiel #30
0
        public async System.Threading.Tasks.Task <DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup> ResolveAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken token)
        {
            var id = await reader.GetFieldValueAsync <System.Guid>(0, token);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup document;
            document = await _serializer.FromJsonAsync <DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup>(reader, 1, token).ConfigureAwait(false);

            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }