Table of Contents

Class CommonUtils

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll

Common utility methods. May be useful when developing simulator connectors

public static class CommonUtils
Inheritance
CommonUtils
Inherited Members

Methods

ConnectorsToExternalIds(Dictionary<string, long>, string)

Function to convert list of connectors to externalIds

public static List<string> ConnectorsToExternalIds(Dictionary<string, long> simulators, string baseConnectorName)

Parameters

simulators Dictionary<string, long>

object of simulator connectors

baseConnectorName string

the base connector name to which prefix will be appended

Returns

List<string>

GetAssemblyVersion()

Returns the assembly version

public static string GetAssemblyVersion()

Returns

string

RunAll(IEnumerable<Task>, CancellationTokenSource)

Run all of the tasks in this enumeration. If any fail or is canceled, cancel the remaining tasks and return. The first found exception is thrown

public static Task RunAll(this IEnumerable<Task> tasks, CancellationTokenSource tokenSource)

Parameters

tasks IEnumerable<Task>

List of tasks to run

tokenSource CancellationTokenSource

Source of cancellation tokens

Returns

Task