30.282. Class ListSessionsRequestExt

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

Provides extension methods for converting gRPC session requests and filters into LINQ expressions for querying objects. Includes utilities for mapping gRPC fields and filters to strongly-typed expressions used in session-related logic.

public static class ListSessionsRequestExt

30.282.1. Inheritance

objectListSessionsRequestExt

30.282.2. Inherited Members

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

30.282.3. Methods

30.282.3.1. ToField(Sort)

Converts gRPC message into the associated field

public static Expression<Func<SessionData, object?>> ToField(this ListSessionsRequest.Types.Sort sort)

30.282.3.1.1. Parameters

sort ListSessionsRequest.Types.Sort

The gPRC message

30.282.3.1.2. Returns

Expression<Func<SessionData, object?>>

The that access the field from the object

30.282.3.1.3. Exceptions

ArgumentOutOfRangeException

the given message is not recognized

30.282.3.2. ToField(SessionField)

Converts gRPC message into the associated field

public static Expression<Func<SessionData, object?>> ToField(this SessionField taskField)

30.282.3.2.1. Parameters

taskField SessionField

The gPRC message field

30.282.3.2.2. Returns

Expression<Func<SessionData, object?>>

The that access the field from the object

30.282.3.2.3. Exceptions

ArgumentOutOfRangeException

the given message is not recognized

30.282.3.3. ToSessionDataFilter(Filters)

Converts gRPC message filters into an that represents the filter conditions

[SuppressMessage("Style", "IDE0066:Convert switch statement to expression", Justification = "Readability for nested switch")]
public static Expression<Func<SessionData, bool>> ToSessionDataFilter(this Filters filters)

30.282.3.3.1. Parameters

filters Filters

The gPRC filters

30.282.3.3.2. Returns

Expression<Func<SessionData, bool>>

The that represents the filter conditions

30.282.3.3.3. Exceptions

ArgumentOutOfRangeException

the given message is not recognized