Show / Hide Table of Contents

Class CogniteExtensions

Extension utilities for the Cognite client

Inheritance
object
CogniteExtensions
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 CogniteExtensions

Methods

| Edit this page View Source

AddExtensionLoggers(IServiceProvider)

Add logger to client extension methods.

Declaration
public static void AddExtensionLoggers(this IServiceProvider provider)
Parameters
Type Name Description
IServiceProvider provider

Serviceprovider to use to get the loggers

| Edit this page View Source

GetRetryPolicy(ILogger?, int?, int?)

Create a polly retry policy configured for use with CDF.

Declaration
public static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy(ILogger? logger, int? maxRetries, int? maxDelay)
Parameters
Type Name Description
ILogger logger

Logger to use on retry

int? maxRetries

Maximum number of retries

int? maxDelay

Maximum delay between each retry in milliseconds, negative for no upper limit

Returns
Type Description
IAsyncPolicy<HttpResponseMessage>
| Edit this page View Source

GetTimeoutPolicy(int?)

Get a polly timeout policy with a timeout set to timeout milliseconds

Declaration
public static IAsyncPolicy<HttpResponseMessage> GetTimeoutPolicy(int? timeout)
Parameters
Type Name Description
int? timeout

Timeout on each request in milliseconds

Returns
Type Description
IAsyncPolicy<HttpResponseMessage>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX