Beispiel #1
0
        internal override async Task ApplyAsync(IMartenSession martenSession, DocumentMetadata metadata, int index,
                                                DbDataReader reader, CancellationToken token)
        {
            if (await reader.IsDBNullAsync(index, token).ConfigureAwait(false))
            {
                return;
            }

            metadata.Headers = await martenSession.Serializer.FromJsonAsync <Dictionary <string, object> >(reader, index, token).ConfigureAwait(false);
        }
Beispiel #2
0
        public override void Apply(IMartenSession martenSession, DocumentMetadata metadata, int index,
                                   DbDataReader reader)
        {
            if (reader.IsDBNull(index))
            {
                return;
            }

            var json = reader.GetTextReader(index);

            metadata.Headers = martenSession.Serializer.FromJson <Dictionary <string, object> >(json);
        }
Beispiel #3
0
        public override async Task ApplyAsync(IMartenSession martenSession, DocumentMetadata metadata, int index,
                                              DbDataReader reader, CancellationToken token)
        {
            if (await reader.IsDBNullAsync(index))
            {
                return;
            }

            var json = reader.GetTextReader(index);

            metadata.Headers = martenSession.Serializer.FromJson <Dictionary <string, object> >(json);
        }
Beispiel #4
0
 internal abstract void Apply(IMartenSession martenSession, DocumentMetadata metadata, int index,
                              DbDataReader reader);
Beispiel #5
0
 internal abstract Task ApplyAsync(IMartenSession martenSession, DocumentMetadata metadata, int index,
                                   DbDataReader reader, CancellationToken token);