Class CogniteResult<TResult, TError>
Represents the result of one or more pushes to CDF. Contains a list of errors, one for each failed push, and potentially pre-push santiation, as well as a list of result objects.
Inherited Members
Namespace: Cognite.Extensions
Assembly: Cognite.Extensions.dll
Syntax
public class CogniteResult<TResult, TError> : CogniteResult<TError>
Type Parameters
Name | Description |
---|---|
TResult | |
TError | Type of skipped data in error |
Constructors
| Edit this page View SourceCogniteResult(IEnumerable<CogniteError<TError>>?, IEnumerable<TResult>?)
Constructor
Declaration
public CogniteResult(IEnumerable<CogniteError<TError>>? errors, IEnumerable<TResult>? results)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<CogniteError<TError>> | errors | Initial list of errors |
IEnumerable<TResult> | results | Initial list of results |
Properties
| Edit this page View SourceResults
A list of results
Declaration
public IEnumerable<TResult>? Results { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<TResult> |
Methods
| Edit this page View SourceMerge(CogniteResult<TResult, TError>?)
Return a new CogniteResult that contains errors and results from both
Declaration
public CogniteResult<TResult, TError> Merge(CogniteResult<TResult, TError>? other)
Parameters
Type | Name | Description |
---|---|---|
CogniteResult<TResult, TError> | other | CogniteResult to merge with |
Returns
Type | Description |
---|---|
CogniteResult<TResult, TError> | A new result containing errors and results from both |
Merge(params CogniteResult<TResult, TError>[])
Return a new CogniteResult of type TResult
that contains errors from all results
given as parameter
Declaration
public static CogniteResult<TResult, TError> Merge(params CogniteResult<TResult, TError>[] results)
Parameters
Type | Name | Description |
---|---|---|
CogniteResult<TResult, TError>[] | results | List of CogniteResult to merge with |
Returns
Type | Description |
---|---|
CogniteResult<TResult, TError> | A new result containing the CogniteErrors from all results given as parameter |
Replace<TRep>(Func<TError, TRep>)
Replace errors in this cognite result using replace
.
Used when the return type of a method is different from type of internal method
(like upsert).
Declaration
public CogniteResult<TResult, TRep> Replace<TRep>(Func<TError, TRep> replace)
Parameters
Type | Name | Description |
---|---|---|
Func<TError, TRep> | replace | Method to replace error type |
Returns
Type | Description |
---|---|
CogniteResult<TResult, TRep> | Result with all errors replaced |
Type Parameters
Name | Description |
---|---|
TRep | New error type |