-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Core.Parameter
Provides factory methods for creating parameter-related objects.
public static class CreateInheritance System.Object → Create
Create.ExternalParameterDefinition(Guid, string, string, ParameterType, Type, AccessType, bool, string) Method
Creates a new external parameter definition with the specified properties.
public static DiGi.Core.Parameter.Classes.ExternalParameterDefinition? ExternalParameterDefinition(System.Guid guid, string? name, string? description, DiGi.Core.Parameter.Enums.ParameterType parameterType, System.Type? type, DiGi.Core.Parameter.Enums.AccessType accessType=DiGi.Core.Parameter.Enums.AccessType.ReadWrite, bool nullable=true, string? groupName=null);guid System.Guid
The unique identifier for the parameter.
name System.String
The name of the parameter.
description System.String
A description of the parameter.
parameterType ParameterType
The type category of the parameter.
type System.Type
The underlying system type of the parameter.
accessType AccessType
The access level of the parameter.
nullable System.Boolean
Whether the parameter can be null.
groupName System.String
The name of the group this parameter belongs to.
ExternalParameterDefinition
A new instance of ExternalParameterDefinition, or null if creation fails.
Create.ExternalParameterDefinition(Guid, string, string, double, double, Type, AccessType, bool, string) Method
Creates a new external parameter definition with specified range constraints.
public static DiGi.Core.Parameter.Classes.ExternalParameterDefinition? ExternalParameterDefinition(System.Guid guid, string? name, string? description, double min, double max, System.Type? type, DiGi.Core.Parameter.Enums.AccessType accessType=DiGi.Core.Parameter.Enums.AccessType.ReadWrite, bool nullable=true, string? groupName=null);guid System.Guid
The unique identifier for the parameter.
name System.String
The name of the parameter.
description System.String
A description of the parameter.
min System.Double
The minimum value constraint.
max System.Double
The maximum value constraint.
type System.Type
The type of the parameter.
accessType AccessType
The access level of the parameter.
nullable System.Boolean
Whether the parameter can be null.
groupName System.String
The name of the group this parameter belongs to.
ExternalParameterDefinition
A new instance of ExternalParameterDefinition, or null if creation fails.
Converts a collection of types to a JsonArray.
public static System.Text.Json.Nodes.JsonArray? JsonArray(this System.Collections.Generic.IEnumerable<System.Type>? types);types System.Collections.Generic.IEnumerable<System.Type>
The collection of types to convert.
System.Text.Json.Nodes.JsonArray
A JsonArray containing the full type names, or null if the input is null.
Creates a parameter using a specified name and value.
public static DiGi.Core.Parameter.Classes.Parameter? Parameter(string? name, object? value);name System.String
The name of the parameter.
value System.Object
The value to assign to the parameter.
Parameter
A Parameter instance, or null.
Creates a parameter based on the provided definition and value.
public static DiGi.Core.Parameter.Classes.Parameter? Parameter(this DiGi.Core.Parameter.Interfaces.IParameterDefinition? parameterDefinition, object? value, DiGi.Core.Parameter.Classes.SetValueSettings? setValueSettings=null);parameterDefinition IParameterDefinition
The definition of the parameter.
value System.Object
The value to assign to the parameter.
setValueSettings SetValueSettings
Optional settings for setting the value.
Parameter
A Parameter instance, or null.
Converts a JsonArray to a list of types.
public static System.Collections.Generic.List<System.Type>? Types(this System.Text.Json.Nodes.JsonArray? jsonArray);jsonArray System.Text.Json.Nodes.JsonArray
The JsonArray to convert.
System.Collections.Generic.List<System.Type>
A list of types, or null if the input is null.
public static class QueryInheritance System.Object → Query
Retrieves the associated types for the specified type.
public static DiGi.Core.Parameter.Classes.AssociatedTypes? AssociatedTypes(System.Type? type);type System.Type
The type for which to retrieve associated types.
AssociatedTypes
The associated types for the specified type, or null if none are found.
Gets the description of the specified enumeration value.
public static string? Description(this System.Enum? @enum);enum System.Enum
The enumeration value for which to get the description.
System.String
The description of the specified enumeration value, or null if no description is found.
Gets the description of the specified type.
public static string? Description(this System.Type? type);type System.Type
The type for which to get the description.
System.String
The description of the specified type, or null if no description is found.
Validates whether the provided value is valid for the given parameter type.
public static bool IsValid(this DiGi.Core.Parameter.Enums.ParameterType parameterType, object? value);parameterType ParameterType
The parameter type to validate against.
value System.Object
The value to be validated.
System.Boolean
True if the value is valid for the specified parameter type; otherwise, false.
Retrieves the properties associated with the specified enumeration value.
public static DiGi.Core.Parameter.Classes.ParameterProperties? ParameterProperties(System.Enum? @enum);enum System.Enum
The enumeration value to retrieve properties for.
ParameterProperties
The ParameterProperties associated with the specified enumeration, or null if not found.
Retrieves the properties associated with the specified type and identifier.
public static DiGi.Core.Parameter.Classes.ParameterProperties? ParameterProperties(System.Type? type, string? text);type System.Type
The type to retrieve properties for.
text System.String
The identifier text used to look up the properties.
ParameterProperties
The ParameterProperties associated with the specified type and text, or null if not found.
Gets the parameter type for the specified enumeration value.
public static DiGi.Core.Parameter.Enums.ParameterType ParameterType(System.Enum? @enum);enum System.Enum
The enumeration value.
ParameterType
The corresponding ParameterType.
Gets the parameter type for the specified type and identifier.
public static DiGi.Core.Parameter.Enums.ParameterType ParameterType(System.Type? type, string? text);type System.Type
The type to evaluate.
text System.String
The identifier text.
ParameterType
The corresponding ParameterType.
Retrieves the parameter value associated with the specified enumeration.
public static TParameterValue? ParameterValue<TParameterValue>(System.Enum? @enum)
where TParameterValue : DiGi.Core.Parameter.Classes.ParameterValue;TParameterValue
The type of the parameter value.
enum System.Enum
The enumeration for which to retrieve the parameter value.
TParameterValue
The parameter value associated with the specified enumeration, or null if not found.
Determines whether the specified access type allows read operations.
public static bool Read(this DiGi.Core.Parameter.Enums.AccessType accessType);accessType AccessType
The access type to check for read permissions.
System.Boolean
True if the access type allows read operations; otherwise, false.
Retrieves the types associated with the specified enumeration.
public static System.Type[]? Types(System.Enum? @enum);enum System.Enum
The enumeration to retrieve types for.
System.Type[]
An array of System.Type objects associated with the specified enumeration, or null.
Determines whether the specified access type allows write operations.
public static bool Write(this DiGi.Core.Parameter.Enums.AccessType accessType);accessType AccessType
The access type to evaluate.
System.Boolean
True if the specified access type allows write operations; otherwise, false.