21.269. Class TaskOptionsExt

Namespace: ArmoniK.Core.Common.gRPC.Convertors
Assembly: ArmoniK.Core.Common.dll

Provides extension methods for converting between internal TaskOptions and gRPC TaskOptions formats.

public static class TaskOptionsExt

21.269.1. Inheritance

objectTaskOptionsExt

21.269.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

21.269.3. Remarks

This static class facilitates the bidirectional conversion between the internal representation of task options and their gRPC counterparts used for external API communication.

21.269.4. Methods

21.269.4.1. ToGrpcTaskOptions(TaskOptions)

Converts an internal TaskOptions to its gRPC representation.

public static TaskOptions ToGrpcTaskOptions(this TaskOptions taskOption)

21.269.4.1.1. Parameters

taskOption TaskOptions

The internal task options to convert.

21.269.4.1.2. Returns

TaskOptions

A new gRPC TaskOptions message populated with values from the internal representation.

21.269.4.2. ToGrpcTaskOptions(TaskOptionsHolder)

Converts a TaskOptionsHolder to its gRPC representation.

public static TaskOptions ToGrpcTaskOptions(this TaskOptionsHolder taskOption)

21.269.4.2.1. Parameters

taskOption TaskOptionsHolder

The task options holder to convert.

21.269.4.2.2. Returns

TaskOptions

A new gRPC TaskOptions message populated with values from the task options holder.

21.269.4.2.3. Remarks

This method handles the TaskOptionsHolder class, which is a storage-specific implementation of task options used within the ArmoniK system.

21.269.4.3. ToNullableTaskOptions(TaskOptions?)

Converts a nullable gRPC TaskOptions to a nullable internal TaskOptions.

public static TaskOptions? ToNullableTaskOptions(this TaskOptions? taskOption)

21.269.4.3.1. Parameters

taskOption TaskOptions?

The nullable gRPC task options to convert.

21.269.4.3.2. Returns

TaskOptions?

A new TaskOptions instance filled with the values from the gRPC message if the input is not null; otherwise, null.

21.269.4.4. ToTaskOptions(TaskOptions)

Converts a gRPC TaskOptions message to the internal TaskOptions representation.

public static TaskOptions ToTaskOptions(this TaskOptions taskOption)

21.269.4.4.1. Parameters

taskOption TaskOptions

The gRPC task options to convert.

21.269.4.4.2. Returns

TaskOptions

A new TaskOptions instance with values copied from the gRPC message.