Class TypeExtensions
Extensions to CogniteSdk types
Inherited Members
Namespace: Cognite.Extensions
Assembly: Cognite.Extensions.dll
Syntax
public static class TypeExtensions
Methods
| Edit this page View SourceToUpdate(AssetCreate, Asset, UpsertParams?)
Build an update from the diff between asset and old,
where old is retrieved from CDF.
Declaration
public static AssetUpdateItem? ToUpdate(this AssetCreate asset, Asset old, UpsertParams? opt)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetCreate | asset | New asset that could not be created during upsert |
| Asset | old | Old asset retrieved from CDF |
| UpsertParams | opt | Options for how fields should be replaced |
Returns
| Type | Description |
|---|---|
| AssetUpdateItem | Update item |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If asset or old are null |
ToUpdate(TimeSeriesCreate, TimeSeries, UpsertParams?)
Build an update from the diff between ts and old,
where old is retrieved from CDF.
Declaration
public static TimeSeriesUpdateItem? ToUpdate(this TimeSeriesCreate ts, TimeSeries old, UpsertParams? opt)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSeriesCreate | ts | New timeseries that could not be created during upsert |
| TimeSeries | old | Old timeseries retrieved from CDF |
| UpsertParams | opt | Options for how fields should be replaced |
Returns
| Type | Description |
|---|---|
| TimeSeriesUpdateItem | Update item |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If ts or old are null |