Show / Hide Table of Contents

Class StreamRecordExtensions

Extension utility methods for the beta streamrecords resource.

Inheritance
object
StreamRecordExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extensions
Assembly: Cognite.Extensions.dll
Syntax
public static class StreamRecordExtensions

Methods

| Edit this page View Source

GetOrCreateStreamAsync(StreamRecordsResource, StreamWrite, CancellationToken)

Retrieve a stream, or create it if it does not exist.

Declaration
public static Task<Stream> GetOrCreateStreamAsync(this StreamRecordsResource streams, StreamWrite stream, CancellationToken token)
Parameters
Type Name Description
StreamRecordsResource streams

Stream resource

StreamWrite stream

Stream to create

CancellationToken token

Cancellation token

Returns
Type Description
Task<Stream>

Created or retrieved stream.

Exceptions
Type Condition
ArgumentNullException
| Edit this page View Source

InsertRecordsAsync(StreamRecordsResource, string, ICollection<StreamRecordWrite>, int, int, CancellationToken)

Insert the given stream records into stream. The stream must exist.

Declaration
public static Task InsertRecordsAsync(this StreamRecordsResource streams, string stream, ICollection<StreamRecordWrite> records, int chunkSize, int throttleSize, CancellationToken token)
Parameters
Type Name Description
StreamRecordsResource streams

Stream resource

string stream

Stream to ingest into

ICollection<StreamRecordWrite> records

Stream records to insert

int chunkSize

Maximum number of records per request

int throttleSize

Maximum number of parallel requests

CancellationToken token

Cancellation token

Returns
Type Description
Task
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX