Interface IDataMapper
Provides and interface for mapping the results of a ViewQuery to it's IViewResult<TKey, TValue>
Namespace: Couchbase.Core.DataMapping
Assembly: Couchbase.NetClient.dll
Syntax
public interface IDataMapper
Methods
| Edit this page View SourceMapAsync<T>(Stream, CancellationToken)
Maps the entire results
Declaration
ValueTask<T> MapAsync<T>(Stream stream, CancellationToken cancellationToken = default) where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The Stream results of the query. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| ValueTask<T> | An object deserialized to it's T type. |
Type Parameters
| Name | Description |
|---|---|
| T | The IViewResult<TKey, TValue>'s Type parameter. |
Map<T>(Stream)
Maps the entire results
Declaration
T Map<T>(Stream stream) where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The Stream results of the query. |
Returns
| Type | Description |
|---|---|
| T | An object deserialized to it's T type. |
Type Parameters
| Name | Description |
|---|---|
| T | The IViewResult<TKey, TValue>'s Type parameter. |