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); }
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); }
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); }
internal abstract void Apply(IMartenSession martenSession, DocumentMetadata metadata, int index, DbDataReader reader);
internal abstract Task ApplyAsync(IMartenSession martenSession, DocumentMetadata metadata, int index, DbDataReader reader, CancellationToken token);