Skip to content

DiGi.Core.Classes

github-actions[bot] edited this page Jul 15, 2026 · 3 revisions

DiGi.Core.Classes Namespace

Classes

Address Class

Represents a physical mailing address including street, city, postal code, and country code.

public class Address : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.IAddress, DiGi.Core.Interfaces.ILocation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObjectSerializableObject → Address

Implements DiGi.Core.Interfaces.IAddress, ILocation, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

Address(Address) Constructor

Initializes a new instance of the Address class using another Address object.

public Address(DiGi.Core.Classes.Address? address);

Parameters

address Address

The source address to copy from.

Address(string, string, string, CountryCode) Constructor

Initializes a new instance of the Address class with specified address details.

public Address(string? street, string? city, string? postalCode, DiGi.Core.Enums.CountryCode countryCode);

Parameters

street System.String

The street name and number.

city System.String

The city name.

postalCode System.String

The postal or zip code.

countryCode CountryCode

The ISO country code.

Address(JsonObject) Constructor

Initializes a new instance of the Address class from a JsonObject.

public Address(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing address data.

Properties

Address.City Property

Gets the city name of the address.

public string? City { get; }

Implements City

Property Value

System.String

Address.CountryCode Property

Gets the ISO country code of the address.

public DiGi.Core.Enums.CountryCode CountryCode { get; }

Implements CountryCode

Property Value

CountryCode

Address.PostalCode Property

Gets the postal or zip code of the address.

public string? PostalCode { get; }

Implements PostalCode

Property Value

System.String

Address.Street Property

Gets the street name and number of the address.

public string? Street { get; }

Implements Street

Property Value

System.String

AnyOf Class

A type-safe container that allows a variable to hold one of several specified types.

public class AnyOf

Inheritance System.Object → AnyOf

Derived
AnyOf<T,K>
AnyOf<T>

Constructors

AnyOf(object, Type) Constructor

Initializes a new instance of the AnyOf class with a value and an optional type.

public AnyOf(object? value, System.Type? type=null);

Parameters

value System.Object

The value to store.

type System.Type

The expected type of the value.

Properties

AnyOf.Types Property

Gets the list of allowed types for this container.

public virtual System.Type[] Types { get; }

Property Value

System.Type[]

AnyOf.Value Property

Gets or sets the underlying value stored in the container.

public object? Value { get; set; }

Property Value

System.Object

Methods

AnyOf.Equals(object) Method

Determines whether the specified object is equal to the current AnyOf instance.

public override bool Equals(object? @object);

Parameters

object System.Object

The object to compare with.

Returns

System.Boolean
True if the objects are equal; otherwise, false.

AnyOf.GetHashCode() Method

Returns the hash code for the contained value.

public override int GetHashCode();

Returns

System.Int32
The hash code of the stored value.

AnyOf.GetType() Method

Retrieves the actual type of the stored value, or the first allowed type if null.

public System.Type? GetType();

Returns

System.Type
The Type of the stored value.

AnyOf.GetValue<T>() Method

Attempts to retrieve the stored value cast to the specified type T.

public T? GetValue<T>();

Type parameters

T

The target type.

Returns

T
The value cast to T, or default if not possible.

AnyOf.IsValid(object) Method

Checks if a given value is compatible with the allowed types of this container.

public bool IsValid(object? value);

Parameters

value System.Object

The value to validate.

Returns

System.Boolean
True if valid; otherwise, false.

AnyOf.ToString() Method

Returns a string representation of the contained value.

public override string? ToString();

Returns

System.String
The string representation.

Operators

AnyOf.operator ==(AnyOf, object) Operator

Compares an AnyOf instance with a specified object for equality.

public static bool operator ==(DiGi.Core.Classes.AnyOf? anyOf, object? @object);

Parameters

anyOf AnyOf

The AnyOf instance to compare.

object System.Object

The object to compare against the AnyOf instance.

Returns

System.Boolean
True if the objects are equal; otherwise, false.

AnyOf.implicit operator AnyOf(bool) Operator

Implicitly converts a boolean value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(bool value);

Parameters

value System.Boolean

The boolean value to convert.

Returns

AnyOf
An AnyOf instance representing the provided boolean value.

AnyOf.implicit operator AnyOf(double) Operator

Implicitly converts a double value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(double value);

Parameters

value System.Double

The double value to convert.

Returns

AnyOf
An AnyOf instance representing the provided double value.

AnyOf.implicit operator AnyOf(int) Operator

Implicitly converts an integer value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(int value);

Parameters

value System.Int32

The integer value to convert.

Returns

AnyOf
An AnyOf instance representing the provided integer value.

AnyOf.implicit operator AnyOf(long) Operator

Implicitly converts a long value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(long value);

Parameters

value System.Int64

The long value to convert.

Returns

AnyOf
An AnyOf instance representing the provided long value.

AnyOf.implicit operator AnyOf(string) Operator

Implicitly converts a string value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(string value);

Parameters

value System.String

The string value to convert.

Returns

AnyOf
An AnyOf instance representing the provided string value.

AnyOf.implicit operator AnyOf(DateTime) Operator

Implicitly converts a System.DateTime value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(System.DateTime value);

Parameters

value System.DateTime

The System.DateTime value to convert.

Returns

AnyOf
An AnyOf instance representing the provided System.DateTime value.

AnyOf.implicit operator AnyOf(Guid) Operator

Implicitly converts a System.Guid value to an AnyOf instance.

public static DiGi.Core.Classes.AnyOf implicit operator DiGi.Core.Classes.AnyOf(System.Guid value);

Parameters

value System.Guid

The System.Guid value to convert.

Returns

AnyOf
An AnyOf instance representing the provided System.Guid value.

AnyOf.implicit operator string(AnyOf) Operator

Implicitly converts an AnyOf instance to a nullable string representation.

public static string? implicit operator string?(DiGi.Core.Classes.AnyOf value);

Parameters

value AnyOf

The AnyOf instance to convert.

Returns

System.String
The string representation of the value, or null if the instance is null.

AnyOf.operator !=(AnyOf, object) Operator

Determines whether the specified AnyOf instance is not equal to the specified object.

public static bool operator !=(DiGi.Core.Classes.AnyOf? anyOf, object? @object);

Parameters

anyOf AnyOf

The AnyOf instance to compare.

object System.Object

The object to compare against the AnyOf instance.

Returns

System.Boolean
True if the objects are not equal; otherwise, false.

AnyOf<T,K> Class

A type-safe container for one of two specified types T or K.

public class AnyOf<T,K> : DiGi.Core.Classes.AnyOf

Type parameters

T

The first type.

K

The second type.

Inheritance System.ObjectAnyOf → AnyOf<T,K>

Constructors

AnyOf(K) Constructor

Initializes a new instance of AnyOf with a value of type K.

public AnyOf(K value);

Parameters

value K

The value to store.

AnyOf(T) Constructor

Initializes a new instance of AnyOf with a value of type T.

public AnyOf(T value);

Parameters

value T

The value to store.

Properties

AnyOf<T,K>.Types Property

Gets the two allowed types T and K for this container.

public override System.Type[] Types { get; }

Property Value

System.Type[]

Operators

AnyOf<T,K>.implicit operator AnyOf<T,K>(K) Operator

Implicitly converts a value of type K to an AnyOf container holding either T or K.

public static DiGi.Core.Classes.AnyOf<T,K> implicit operator DiGi.Core.Classes.AnyOf<T,K>(K value);

Parameters

value K

The value of type K to convert.

Returns

DiGi.Core.Classes.AnyOf<T,K>
An AnyOf container holding the provided value of type K.

AnyOf<T,K>.implicit operator AnyOf<T,K>(T) Operator

Implicitly converts a value of type T to an AnyOf container holding either T or K.

public static DiGi.Core.Classes.AnyOf<T,K> implicit operator DiGi.Core.Classes.AnyOf<T,K>(T value);

Parameters

value T

The value of type T to be wrapped in an AnyOf container.

Returns

DiGi.Core.Classes.AnyOf<T,K>
An AnyOf container holding the provided value of type T.

AnyOf<T,K>.implicit operator K(AnyOf<T,K>) Operator

Implicitly converts the AnyOf container to its contained value of type K.

public static K? implicit operator K?(DiGi.Core.Classes.AnyOf<T,K> anyOf);

Parameters

anyOf DiGi.Core.Classes.AnyOf<T,K>

The AnyOf instance to convert.

Returns

K
The contained value of type K, or the default value if the container is null.

AnyOf<T,K>.implicit operator T(AnyOf<T,K>) Operator

Implicitly converts the AnyOf container to its contained value of type T.

public static T? implicit operator T?(DiGi.Core.Classes.AnyOf<T,K> anyOf);

Parameters

anyOf DiGi.Core.Classes.AnyOf<T,K>

The AnyOf instance to convert.

Returns

T
The contained value of type T, or the default value if the container is null.

AnyOf<T> Class

A type-safe container for a single specified type T.

public class AnyOf<T> : DiGi.Core.Classes.AnyOf

Type parameters

T

The specified type.

Inheritance System.ObjectAnyOf → AnyOf<T>

Constructors

AnyOf(T) Constructor

A type-safe container for a single specified type T.

public AnyOf(T value);

Parameters

value T

Properties

AnyOf<T>.Types Property

Gets the single allowed type T for this container.

public override System.Type[] Types { get; }

Property Value

System.Type[]

Operators

AnyOf<T>.implicit operator T(AnyOf<T>) Operator

Implicitly converts an AnyOf<T> container to its contained value of type T.

public static T? implicit operator T?(DiGi.Core.Classes.AnyOf<T> anyOf);

Parameters

anyOf DiGi.Core.Classes.AnyOf<T>

The AnyOf<T> instance to convert.

Returns

T
The contained value of type T, or the default value if the instance is null.

BackgroundTask Class

Provides a base class for background tasks with status tracking and event notifications.

public abstract class BackgroundTask : DiGi.Core.Interfaces.IBackgroundTask, DiGi.Core.Interfaces.IObject

Inheritance System.Object → BackgroundTask

Derived
CancelableBackgroundTask

Implements IBackgroundTask, IObject

Fields

BackgroundTask.exception Field

Stores any exception that occurred during task execution.

protected Exception? exception;

Field Value

System.Exception

BackgroundTask.isRunning Field

Indicates whether the task is currently running.

private bool isRunning;

Field Value

System.Boolean

BackgroundTask.isSucceeded Field

Indicates whether the last task execution succeeded.

private bool isSucceeded;

Field Value

System.Boolean

BackgroundTask.lockObject Field

Object used for thread synchronization.

protected readonly object lockObject;

Field Value

System.Object

BackgroundTask.stopwatch Field

Measures the execution time of the task.

private readonly Stopwatch stopwatch;

Field Value

System.Diagnostics.Stopwatch

Properties

BackgroundTask.BackgroundTaskStatus Property

Gets the current status of the background task.

public DiGi.Core.Enums.BackgroundTaskStatus BackgroundTaskStatus { get; }

Implements BackgroundTaskStatus

Property Value

BackgroundTaskStatus

BackgroundTask.Exception Property

Gets the exception that caused the task to fail, or null if the task succeeded.

public System.Exception? Exception { get; }

Implements Exception

Property Value

System.Exception

BackgroundTask.ExecutionTimeSpan Property

Gets the total execution time of the last run.

public System.TimeSpan ExecutionTimeSpan { get; }

Implements ExecutionTimeSpan

Property Value

System.TimeSpan

BackgroundTask.IsCompleted Property

Gets a value indicating whether the task has completed.

public bool IsCompleted { get; }

Property Value

System.Boolean

BackgroundTask.IsRunning Property

Gets a value indicating whether the task is currently running.

public bool IsRunning { get; }

Implements IsRunning

Property Value

System.Boolean

BackgroundTask.IsSucceeded Property

Gets a value indicating whether the last task execution succeeded.

public bool IsSucceeded { get; }

Property Value

System.Boolean

BackgroundTask.Task Property

Gets or sets the underlying task associated with this background task.

protected System.Threading.Tasks.Task? Task { protected get; protected set; }

Property Value

System.Threading.Tasks.Task

Methods

BackgroundTask.ExecuteAsync() Method

When overridden in a derived class, defines the work to be executed by the background task.

protected abstract System.Threading.Tasks.Task<bool> ExecuteAsync();

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the task succeeded; otherwise, false.

BackgroundTask.OnStarted() Method

Raises the Started event.

protected virtual void OnStarted();

BackgroundTask.OnStarting() Method

Raises the Starting event.

protected virtual void OnStarting();

BackgroundTask.OnStopped() Method

Raises the Stopped event.

protected virtual void OnStopped();

BackgroundTask.OnStopping() Method

Raises the Stopping event.

protected virtual void OnStopping();

BackgroundTask.Start() Method

Starts the background task execution.

public virtual void Start();

Implements Start()

Events

BackgroundTask.Started Event

Occurs when the task has started execution.

public event EventHandler? Started;

Implements Started

Event Type

System.EventHandler

BackgroundTask.Starting Event

Occurs when the task is about to start execution.

public event EventHandler? Starting;

Implements Starting

Event Type

System.EventHandler

BackgroundTask.Stopped Event

Occurs when the task has stopped execution.

public event EventHandler? Stopped;

Implements Stopped

Event Type

System.EventHandler

BackgroundTask.Stopping Event

Occurs when the task is about to stop execution.

public event EventHandler? Stopping;

Implements Stopping

Event Type

System.EventHandler

CancelableBackgroundTask Class

Provides a base class for background tasks that can be canceled during execution.

public abstract class CancelableBackgroundTask : DiGi.Core.Classes.BackgroundTask, DiGi.Core.Interfaces.ICancelableBackgroundTask, DiGi.Core.Interfaces.IBackgroundTask, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectBackgroundTask → CancelableBackgroundTask

Derived
ReportableBackgroundTask<T>

Implements ICancelableBackgroundTask, IBackgroundTask, IObject

Fields

CancelableBackgroundTask.cancellationTokenSource Field

Source for controlling cancellation of the background task.

private CancellationTokenSource? cancellationTokenSource;

Field Value

System.Threading.CancellationTokenSource

Properties

CancelableBackgroundTask.CancelableBackgroundTaskStatus Property

Gets the current status of the cancelable background task.

public DiGi.Core.Enums.CancelableBackgroundTaskStatus CancelableBackgroundTaskStatus { get; }

Implements CancelableBackgroundTaskStatus

Property Value

CancelableBackgroundTaskStatus

CancelableBackgroundTask.IsCanceled Property

Gets a value indicating whether the task has been canceled.

public bool IsCanceled { get; }

Property Value

System.Boolean

Methods

CancelableBackgroundTask.Cleanup() Method

Cleans up the cancellation token source and resets task state.

private void Cleanup();

CancelableBackgroundTask.ExecuteAsync() Method

Executes the background task with cancellation support.

protected override System.Threading.Tasks.Task<bool> ExecuteAsync();

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the task succeeded; otherwise, false.

CancelableBackgroundTask.ExecuteAsync(CancellationToken) Method

When overridden in a derived class, defines the work to be executed with a cancellation token.

protected abstract System.Threading.Tasks.Task<bool> ExecuteAsync(System.Threading.CancellationToken token);

Parameters

token System.Threading.CancellationToken

The cancellation token to observe.

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the task succeeded; otherwise, false.

CancelableBackgroundTask.OnCanceled() Method

Raises the Canceled event.

protected virtual void OnCanceled();

CancelableBackgroundTask.OnCancelling() Method

Raises the Cancelling event.

protected virtual void OnCancelling();

CancelableBackgroundTask.Start() Method

Starts the background task execution synchronously.

public override void Start();

Implements Start()

CancelableBackgroundTask.Stop() Method

Stops the background task synchronously by canceling and waiting for completion.

public void Stop();

CancelableBackgroundTask.StopAsync() Method

Stops the background task asynchronously by canceling and waiting for completion.

public System.Threading.Tasks.Task StopAsync();

Implements StopAsync()

Returns

System.Threading.Tasks.Task
A task that represents the asynchronous stop operation.

Events

CancelableBackgroundTask.Canceled Event

Occurs when the task has been canceled.

public event EventHandler? Canceled;

Event Type

System.EventHandler

CancelableBackgroundTask.Cancelling Event

Occurs when the task is being canceled.

public event EventHandler? Cancelling;

Event Type

System.EventHandler

Category Class

Represents a named category that can contain hierarchical subcategories.

public class Category : DiGi.Core.Classes.SerializableObject, System.IEquatable<DiGi.Core.Classes.Category>

Inheritance System.ObjectObjectSerializableObject → Category

Implements System.IEquatable<Category>

Constructors

Category(Category) Constructor

Initializes a new instance of the Category class by cloning an existing category.

public Category(DiGi.Core.Classes.Category? category);

Parameters

category Category

The category to clone.

Category(string) Constructor

Initializes a new instance of the Category class with a specified name.

public Category(string? name);

Parameters

name System.String

The name of the category.

Category(string, IEnumerable<Category>) Constructor

Initializes a new instance of the Category class with a specified name and a collection of subcategories.

public Category(string? name, System.Collections.Generic.IEnumerable<DiGi.Core.Classes.Category>? subCategories);

Parameters

name System.String

The name of the category.

subCategories System.Collections.Generic.IEnumerable<Category>

The initial set of subcategories.

Category(JsonObject) Constructor

Initializes a new instance of the Category class from a JsonObject.

public Category(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to deserialize.

Properties

Category.Name Property

Gets the name of the category.

public string? Name { get; }

Property Value

System.String

Category.SubCategories Property

Gets or sets the list of subcategories.

public System.Collections.Generic.List<DiGi.Core.Classes.Category>? SubCategories { get; set; }

Property Value

System.Collections.Generic.List<Category>

Methods

Category.Add(Category) Method

Adds a subcategory to the current category.

public bool Add(DiGi.Core.Classes.Category? category);

Parameters

category Category

The category to add.

Returns

System.Boolean
True if the category was successfully added; otherwise, false.

Category.Add(string) Method

Creates and adds a subcategory with the specified name.

public DiGi.Core.Classes.Category? Add(string? name);

Parameters

name System.String

The name of the subcategory to add.

Returns

Category
The newly created Category, or null if it could not be added.

Category.AddRange(IEnumerable<Category>) Method

Adds a collection of subcategories to the current category.

public void AddRange(System.Collections.Generic.IEnumerable<DiGi.Core.Classes.Category>? subCategories);

Parameters

subCategories System.Collections.Generic.IEnumerable<Category>

The collection of categories to add.

Category.Clone() Method

Creates a deep copy of the current category.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A cloned version of the category as an ISerializableObject.

Category.Equals(Category) Method

Determines whether the current Category is equal to another Category.

public bool Equals(DiGi.Core.Classes.Category? category);

Parameters

category Category

The other category to compare with.

Returns

System.Boolean
True if they are equal; otherwise, false.

Category.Equals(object) Method

Determines whether the current Category is equal to a specified object.

public override bool Equals(object? @object);

Parameters

object System.Object

The object to compare with.

Returns

System.Boolean
True if they are equal; otherwise, false.

Category.GetHashCode() Method

Returns a hash code for the current category based on its name and subcategories.

public override int GetHashCode();

Returns

System.Int32
A numeric hash code.

Category.ToString() Method

Returns a string that represents the current category's name.

public override string? ToString();

Returns

System.String
The category name.

Operators

Category.operator ==(Category, Category) Operator

Determines whether two Category instances are equal.

public static bool operator ==(DiGi.Core.Classes.Category? category_1, DiGi.Core.Classes.Category? category_2);

Parameters

category_1 Category

The first Category instance to compare.

category_2 Category

The second Category instance to compare.

Returns

System.Boolean
True if the two Category instances are considered equal; otherwise, false.

Category.implicit operator Category(string) Operator

Implicitly converts a string to a Category instance.

public static DiGi.Core.Classes.Category? implicit operator DiGi.Core.Classes.Category?(string? name);

Parameters

name System.String

The name of the category as a System.String.

Returns

Category
A new Category instance created from the provided name, or null if the name is null.

Category.implicit operator string(Category) Operator

Implicitly converts a Category instance to its name as a string.

public static string? implicit operator string?(DiGi.Core.Classes.Category? category);

Parameters

category Category

The Category instance to convert.

Returns

System.String
The name of the category as a System.String, or null if the category is null.

Category.operator !=(Category, Category) Operator

Determines whether two Category instances are not equal.

public static bool operator !=(DiGi.Core.Classes.Category? category_1, DiGi.Core.Classes.Category? category_2);

Parameters

category_1 Category

The first Category instance to compare.

category_2 Category

The second Category instance to compare.

Returns

System.Boolean
True if the two Category instances are not considered equal; otherwise, false.

CategoryPath Class

Represents a hierarchical path to a category.

public class CategoryPath : DiGi.Core.Classes.ObjectPath<DiGi.Core.Classes.CategoryPath>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.ObjectPath<CategoryPath> → CategoryPath

Constructors

CategoryPath(string) Constructor

Initializes a new instance of the CategoryPath class with a single segment name.

public CategoryPath(string name);

Parameters

name System.String

The name of the category segment.

CategoryPath(string, CategoryPath) Constructor

Initializes a new instance of the CategoryPath class by appending a name to an existing path.

public CategoryPath(string name, DiGi.Core.Classes.CategoryPath path);

Parameters

name System.String

The name of the segment to append.

path CategoryPath

The existing category path to which the name will be appended.

CategoryPath(IEnumerable<string>) Constructor

Initializes a new instance of the CategoryPath class using a collection of segment names.

public CategoryPath(System.Collections.Generic.IEnumerable<string> names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

The collection of segment names to initialize the path.

CategoryPath(JsonObject) Constructor

Initializes a new instance of the CategoryPath class from a JSON object.

public CategoryPath(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the category path.

Cluster<TKey_1,TKey_2,TValue> Class

An abstract base class for a two-key-indexed collection of values.

public abstract class Cluster<TKey_1,TKey_2,TValue> : DiGi.Core.Interfaces.IObject, System.Collections.Generic.IEnumerable<TValue>, System.Collections.IEnumerable

Type parameters

TKey_1

The type of the first key.

TKey_2

The type of the second key.

TValue

The type of the value.

Inheritance System.Object → Cluster<TKey_1,TKey_2,TValue>

Derived
List<TKey_1,TKey_2,TValue>
ValueCluster<TKey_1,TKey_2,TValue>

Implements IObject, System.Collections.Generic.IEnumerable<TValue>, System.Collections.IEnumerable

Constructors

Cluster() Constructor

Initializes a new instance of the Cluster class.

public Cluster();

Cluster(Cluster<TKey_1,TKey_2,TValue>) Constructor

Initializes a new instance of the Cluster class by cloning another cluster.

public Cluster(DiGi.Core.Classes.Cluster<TKey_1,TKey_2,TValue>? cluster);

Parameters

cluster DiGi.Core.Classes.Cluster<TKey_1,TKey_2,TValue>

The cluster to clone.

Cluster(IEnumerable<TValue>) Constructor

Initializes a new instance of the Cluster class with the specified values.

public Cluster(System.Collections.Generic.IEnumerable<TValue>? values);

Parameters

values System.Collections.Generic.IEnumerable<TValue>

The values to populate the cluster with.

Properties

Cluster<TKey_1,TKey_2,TValue>.Values Property

Gets or sets the list of values in the cluster.

public System.Collections.Generic.List<TValue>? Values { get; set; }

Property Value

System.Collections.Generic.List<TValue>

Methods

Cluster<TKey_1,TKey_2,TValue>.Add(TValue) Method

Adds a value to the cluster.

public abstract bool Add(TValue? value);

Parameters

value TValue

The value to add.

Returns

System.Boolean
True if the value was added; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.AddRange<UValue>(IEnumerable<UValue>) Method

Adds multiple values to the cluster and returns those that were successfully added.

public System.Collections.Generic.List<UValue>? AddRange<UValue>(System.Collections.Generic.IEnumerable<UValue?>? values)
    where UValue : TValue;

Type parameters

UValue

The type of the values.

Parameters

values System.Collections.Generic.IEnumerable<UValue>

The values to add.

Returns

System.Collections.Generic.List<UValue>
A list of values that were successfully added.

Cluster<TKey_1,TKey_2,TValue>.Clear() Method

Clears all values from the cluster.

public abstract void Clear();

Cluster<TKey_1,TKey_2,TValue>.Contains(TKey_1) Method

Determines whether the cluster contains a value with the specified first key.

public abstract bool Contains(TKey_1? key_1);

Parameters

key_1 TKey_1

The first key to locate.

Returns

System.Boolean
True if the cluster contains a value with the specified key; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.Contains(TKey_1, TKey_2) Method

Determines whether the cluster contains a value with the specified first and second keys.

public abstract bool Contains(TKey_1? key_1, TKey_2? key_2);

Parameters

key_1 TKey_1

The first key to locate.

key_2 TKey_2

The second key to locate.

Returns

System.Boolean
True if the cluster contains a value with the specified keys; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.Contains(TValue) Method

Determines whether the cluster contains a specific value.

public abstract bool Contains(TValue? value);

Parameters

value TValue

The value to locate.

Returns

System.Boolean
True if the cluster contains the value; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.GetEnumerator() Method

Returns an enumerator that iterates through the cluster values.

public System.Collections.Generic.IEnumerator<TValue> GetEnumerator();

Implements GetEnumerator(), GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<TValue>
An enumerator for the cluster values.

Cluster<TKey_1,TKey_2,TValue>.GetKeys_1() Method

Gets a list of all unique first keys in the cluster.

public virtual System.Collections.Generic.List<TKey_1>? GetKeys_1();

Returns

System.Collections.Generic.List<TKey_1>
A list of first keys, or null if the cluster has no values.

Cluster<TKey_1,TKey_2,TValue>.GetKeys_2(TKey_1) Method

Gets a list of all unique second keys for values with the specified first key.

public virtual System.Collections.Generic.List<TKey_2>? GetKeys_2(TKey_1? key_1);

Parameters

key_1 TKey_1

The first key to filter by.

Returns

System.Collections.Generic.List<TKey_2>
A list of second keys, or null if key_1 is null or the cluster has no matching values.

Cluster<TKey_1,TKey_2,TValue>.GetKey_1(TValue) Method

Gets the first key for a given value.

protected abstract TKey_1? GetKey_1(TValue? value);

Parameters

value TValue

The value to get the key from.

Returns

TKey_1
The first key, or null.

Cluster<TKey_1,TKey_2,TValue>.GetKey_2(TValue) Method

Gets the second key for a given value.

protected abstract TKey_2? GetKey_2(TValue? value);

Parameters

value TValue

The value to get the key from.

Returns

TKey_2
The second key, or null.

Cluster<TKey_1,TKey_2,TValue>.GetValue<UValue>(Func<UValue,bool>) Method

Gets the first value matching the specified predicate.

public virtual UValue? GetValue<UValue>(System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

func System.Func<UValue,System.Boolean>

A predicate function to filter values.

Returns

UValue
The first matching value, or default if none found.

Cluster<TKey_1,TKey_2,TValue>.GetValues<UValue>() Method

Gets a list of all values of the specified type.

public abstract System.Collections.Generic.List<UValue>? GetValues<UValue>()
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Returns

System.Collections.Generic.List<UValue>
A list of values, or null if none found.

Cluster<TKey_1,TKey_2,TValue>.GetValues<UValue>(Func<UValue,bool>) Method

Gets a list of values filtered by the specified predicate.

public System.Collections.Generic.List<UValue>? GetValues<UValue>(System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

func System.Func<UValue,System.Boolean>

A predicate function to filter values.

Returns

System.Collections.Generic.List<UValue>
A list of matching values.

Cluster<TKey_1,TKey_2,TValue>.GetValues<UValue>(TKey_1) Method

Gets a list of values filtered by the specified first key.

public virtual System.Collections.Generic.List<UValue>? GetValues<UValue>(TKey_1? key_1)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

key_1 TKey_1

The first key to filter by.

Returns

System.Collections.Generic.List<UValue>
A list of matching values, or null if none found.

Cluster<TKey_1,TKey_2,TValue>.IsValid(TValue) Method

Determines whether the specified value is valid for this cluster.

public virtual bool IsValid(TValue? value);

Parameters

value TValue

The value to validate.

Returns

System.Boolean
True if the value is valid; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.Remove(TKey_1) Method

Removes all values with the specified first key.

public abstract bool Remove(TKey_1? key_1);

Parameters

key_1 TKey_1

The first key to filter by.

Returns

System.Boolean
True if any values were removed; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.Remove(TKey_1, TKey_2) Method

Removes all values with the specified first and second keys.

public abstract bool Remove(TKey_1? key_1, TKey_2? key_2);

Parameters

key_1 TKey_1

The first key to filter by.

key_2 TKey_2

The second key to filter by.

Returns

System.Boolean
True if any values were removed; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.Remove(TValue) Method

Removes a specific value from the cluster.

public abstract bool Remove(TValue? value);

Parameters

value TValue

The value to remove.

Returns

System.Boolean
True if the value was removed; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.SetValues(IEnumerable<TValue>) Method

Sets the cluster values by clearing existing values and adding the specified ones.

protected bool SetValues(System.Collections.Generic.IEnumerable<TValue>? values);

Parameters

values System.Collections.Generic.IEnumerable<TValue>

The values to set.

Returns

System.Boolean
True if values were set successfully; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.TryGetValue<UValue>(UValue, Func<UValue,bool>) Method

Attempts to get the first value matching the specified predicate.

public bool TryGetValue<UValue>(out UValue? value, System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

value UValue

When this method returns, contains the first matching value, or default if no match was found.

func System.Func<UValue,System.Boolean>

A predicate function to filter values.

Returns

System.Boolean
True if a matching value was found; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.TryGetValues<UValue>(List<UValue>, Func<UValue,bool>) Method

Attempts to get values filtered by the specified predicate.

public bool TryGetValues<UValue>(out System.Collections.Generic.List<UValue>? values, System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

values System.Collections.Generic.List<UValue>

When this method returns, contains the matching values, or null if none found.

func System.Func<UValue,System.Boolean>

A predicate function to filter values.

Returns

System.Boolean
True if any matching values were found; otherwise, false.

Cluster<TKey_1,TKey_2,TValue>.TryGetValues<UValue>(TKey_1, List<UValue>) Method

Attempts to get values filtered by the specified first key.

public bool TryGetValues<UValue>(TKey_1? key_1, out System.Collections.Generic.List<UValue>? values)
    where UValue : TValue;

Type parameters

UValue

The type of the value.

Parameters

key_1 TKey_1

The first key to filter by.

values System.Collections.Generic.List<UValue>

When this method returns, contains the matching values, or null if none found.

Returns

System.Boolean
True if any matching values were found; otherwise, false.

Explicit Interface Implementations

System.Collections.IEnumerable.GetEnumerator() Method

Returns an enumerator that iterates through the cluster values.

System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();

Implements GetEnumerator()

Color Class

Represents an ARGB color, providing conversions between integer values and System.Drawing.Color.

public class Color : DiGi.Core.Classes.SerializableObject

Inheritance System.ObjectObjectSerializableObject → Color

Constructors

Color(byte, byte, byte, byte) Constructor

Initializes a new instance of the Color class with specified ARGB components.

public Color(byte alpha, byte red, byte green, byte blue);

Parameters

alpha System.Byte

The alpha component.

red System.Byte

The red component.

green System.Byte

The green component.

blue System.Byte

The blue component.

Color(Color) Constructor

Initializes a new instance of the Color class by copying another Color instance.

public Color(DiGi.Core.Classes.Color? color);

Parameters

color Color

The source color to copy from.

Color(int) Constructor

Initializes a new instance of the Color class from an integer value.

public Color(int value);

Parameters

value System.Int32

The ARGB integer value.

Color(Color) Constructor

Initializes a new instance of the Color class from a System.Drawing.Color object.

public Color(System.Drawing.Color color);

Parameters

color System.Drawing.Color

The source color.

Color(JsonObject) Constructor

Initializes a new instance of the Color class from a JsonObject.

public Color(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing color data.

Properties

Color.Alpha Property

Gets the alpha component of the color.

public byte Alpha { get; }

Property Value

System.Byte

Color.Blue Property

Gets the blue component of the color.

public byte Blue { get; }

Property Value

System.Byte

Color.Green Property

Gets the green component of the color.

public byte Green { get; }

Property Value

System.Byte

Color.Red Property

Gets the red component of the color.

public byte Red { get; }

Property Value

System.Byte

Color.Value Property

Gets the integer representation (ARGB) of the color.

public int Value { get; }

Property Value

System.Int32

Methods

Color.Equals(object) Method

Determines whether the specified object is equal to the current Color instance.

public override bool Equals(object? @object);

Parameters

object System.Object

The object to compare with.

Returns

System.Boolean
True if the objects are equal; otherwise, false.

Color.GetHashCode() Method

Returns a hash code for the current Color instance.

public override int GetHashCode();

Returns

System.Int32
The hash code of the color.

Operators

Color.operator ==(Color, Color) Operator

Determines whether two Color instances are equal.

public static bool operator ==(DiGi.Core.Classes.Color? color_1, DiGi.Core.Classes.Color? color_2);

Parameters

color_1 Color

The first Color instance to compare.

color_2 Color

The second Color instance to compare.

Returns

System.Boolean
true if the two Color instances are equal; otherwise, false.

Color.implicit operator Color(int) Operator

Implicitly converts an integer representation of a color (typically in ARGB format) to a Color instance.

public static DiGi.Core.Classes.Color implicit operator DiGi.Core.Classes.Color(int value);

Parameters

value System.Int32

The integer value representing the color.

Returns

Color
A new Color instance created from the specified integer value.

Color.implicit operator Color(Color) Operator

Implicitly converts a System.Drawing.Color instance to a Color instance.

public static DiGi.Core.Classes.Color implicit operator DiGi.Core.Classes.Color(System.Drawing.Color color);

Parameters

color System.Drawing.Color

The System.Drawing.Color instance to convert.

Returns

Color
A new Color instance created from the specified System.Drawing.Color.

Color.implicit operator Color(Color) Operator

Implicitly converts a nullable Color instance to a System.Drawing.Color instance.

public static System.Drawing.Color implicit operator System.Drawing.Color(DiGi.Core.Classes.Color? color);

Parameters

color Color

The nullable Color instance to convert.

Returns

System.Drawing.Color
A System.Drawing.Color instance representing the specified color, or System.Drawing.Color.Empty if the provided color is null.

Color.operator !=(Color, Color) Operator

Determines whether two Color instances are not equal.

public static bool operator !=(DiGi.Core.Classes.Color? color_1, DiGi.Core.Classes.Color? color_2);

Parameters

color_1 Color

The first Color instance to compare.

color_2 Color

The second Color instance to compare.

Returns

System.Boolean
true if the two Color instances are not equal; otherwise, false.

ConfigurationFile Class

Manages the reading, writing, and retrieval of key-value pair configuration settings from a file.

public class ConfigurationFile : DiGi.Core.Classes.SerializableObject

Inheritance System.ObjectObjectSerializableObject → ConfigurationFile

Constructors

ConfigurationFile() Constructor

Initializes a new empty instance of the ConfigurationFile class.

public ConfigurationFile();

ConfigurationFile(ConfigurationFile) Constructor

Initializes a new instance of the ConfigurationFile class by copying settings from another instance.

public ConfigurationFile(DiGi.Core.Classes.ConfigurationFile? configurationFile);

Parameters

configurationFile ConfigurationFile

The source configuration file to copy from.

ConfigurationFile(JsonObject) Constructor

Initializes a new instance of the ConfigurationFile class from a JsonObject.

public ConfigurationFile(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing configuration data.

Properties

ConfigurationFile.Dictionary Property

Gets the dictionary containing key-value configuration settings.

public System.Collections.Generic.Dictionary<string,string> Dictionary { get; }

Property Value

System.Collections.Generic.Dictionary<System.String,System.String>

ConfigurationFile.Names Property

Gets the list of all configuration key names.

public System.Collections.Generic.List<string> Names { get; }

Property Value

System.Collections.Generic.List<System.String>

Methods

ConfigurationFile.Add(string, string) Method

Adds or removes a string configuration setting.

public bool Add(string name, string? value);

Parameters

name System.String

The key of the setting.

value System.String

The value to set, or null to remove the setting.

Returns

System.Boolean
True if the operation was successful; otherwise, false.

ConfigurationFile.Add(string, Nullable<bool>) Method

Adds or removes a boolean configuration setting.

public bool Add(string name, System.Nullable<bool> value);

Parameters

name System.String

The key of the setting.

value System.Nullable<System.Boolean>

The value to set, or null to remove the setting.

Returns

System.Boolean
True if the operation was successful; otherwise, false.

ConfigurationFile.Add(string, Nullable<double>) Method

Adds or removes a double configuration setting.

public bool Add(string name, System.Nullable<double> value);

Parameters

name System.String

The key of the setting.

value System.Nullable<System.Double>

The value to set, or null to remove the setting.

Returns

System.Boolean
True if the operation was successful; otherwise, false.

ConfigurationFile.Add(string, Nullable<int>) Method

Adds or removes an integer configuration setting.

public bool Add(string name, System.Nullable<int> value);

Parameters

name System.String

The key of the setting.

value System.Nullable<System.Int32>

The value to set, or null to remove the setting.

Returns

System.Boolean
True if the operation was successful; otherwise, false.

ConfigurationFile.Append(ConfigurationFile) Method

Appends settings from another configuration file instance to this one.

public bool Append(DiGi.Core.Classes.ConfigurationFile? configurationFile);

Parameters

configurationFile ConfigurationFile

The source configuration file.

Returns

System.Boolean
True if any settings were appended; otherwise, false.

ConfigurationFile.Contains(string, bool) Method

Checks if a configuration setting exists by its name.

public bool Contains(string? name, bool caseSensitive=false);

Parameters

name System.String

The key to look for.

caseSensitive System.Boolean

Whether the search should be case-sensitive.

Returns

System.Boolean
True if the key exists; otherwise, false.

ConfigurationFile.GetValue(string, bool) Method

Retrieves a configuration value as an object.

public object? GetValue(string name, bool caseSensitive=false);

Parameters

name System.String

The key of the setting.

caseSensitive System.Boolean

Whether the search should be case-sensitive.

Returns

System.Object
The retrieved value, or null if not found.

ConfigurationFile.GetValue<T>(string, bool) Method

Retrieves a configuration value and attempts to cast it to type T.

public T? GetValue<T>(string name, bool caseSensitive=false);

Type parameters

T

The target type.

Parameters

name System.String

The key of the setting.

caseSensitive System.Boolean

Whether the search should be case-sensitive.

Returns

T
The value cast to T, or default if not found or conversion fails.

ConfigurationFile.GetValue<T>(string, T, bool) Method

Retrieves a configuration value and attempts to cast it to type T, or returns a default value.

public T? GetValue<T>(string name, T? defaultValue, bool caseSensitive=false);

Type parameters

T

The target type.

Parameters

name System.String

The key of the setting.

defaultValue T

The value to return if not found or conversion fails.

caseSensitive System.Boolean

Whether the search should be case-sensitive.

Returns

T
The retrieved value cast to T, or the defaultValue.

ConfigurationFile.Read(string) Method

Reads configuration settings from a file at the specified path.

public bool Read(string path);

Parameters

path System.String

The absolute or relative path to the configuration file.

Returns

System.Boolean
True if the file was read successfully; otherwise, false.

ConfigurationFile.Read(string[]) Method

Reads configuration settings from an array of strings (lines).

public bool Read(string[]? lines);

Parameters

lines System.String[]

The lines to parse as key-value pairs.

Returns

System.Boolean
True if at least one setting was read successfully; otherwise, false.

ConfigurationFile.Remove(string) Method

Removes a configuration setting by its name.

public bool Remove(string name);

Parameters

name System.String

The key of the setting to remove.

Returns

System.Boolean
True if the setting was removed; otherwise, false.

ConfigurationFile.TryGetValue<T>(string, T, bool) Method

Attempts to retrieve a configuration value and convert it to type T.

public bool TryGetValue<T>(string name, out T? value, bool caseSensitive=false);

Type parameters

T

The target type.

Parameters

name System.String

The key of the setting.

value T

The converted value, if successful.

caseSensitive System.Boolean

Whether the search should be case-sensitive.

Returns

System.Boolean
True if the value was found and successfully converted; otherwise, false.

ConfigurationFile.Write(string) Method

Writes the current configuration settings to a file at the specified path.

public bool Write(string path);

Parameters

path System.String

The path where the configuration file should be written.

Returns

System.Boolean
True if the file was written successfully; otherwise, false.

ConversionManager Class

Caches and retrieves reflection data (MethodInfo) for type conversion methods.

public class ConversionManager

Inheritance System.Object → ConversionManager

Constructors

ConversionManager() Constructor

Initializes a new instance of the ConversionManager class.

public ConversionManager();

Methods

ConversionManager.GetMethodInfo(string, bool) Method

Retrieves the System.Reflection.MethodInfo for the specified full type name.

public System.Reflection.MethodInfo? GetMethodInfo(string? fullTypeName, bool update=true);

Parameters

fullTypeName System.String

The full name of the type to get the method info for.

update System.Boolean

If set to true, updates the internal cache if the method info is not found.

Returns

System.Reflection.MethodInfo
The System.Reflection.MethodInfo if found; otherwise, null.

ConversionManager.GetMethodInfo(Type, bool) Method

Retrieves the System.Reflection.MethodInfo for the specified type.

public System.Reflection.MethodInfo? GetMethodInfo(System.Type? type, bool update=true);

Parameters

type System.Type

The type to get the method info for.

update System.Boolean

If set to true, updates the internal cache if the method info is not found.

Returns

System.Reflection.MethodInfo
The System.Reflection.MethodInfo if found; otherwise, null.

ConvertOptions Class

An abstract base class for defining options used during data conversion processes.

public abstract class ConvertOptions : DiGi.Core.Classes.SerializableOptions, DiGi.Core.Interfaces.IConvertOptions, DiGi.Core.Interfaces.IOptions, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObjectSerializableObjectSerializableOptions → ConvertOptions

Implements DiGi.Core.Interfaces.IConvertOptions, IOptions, IObject

Constructors

ConvertOptions() Constructor

Initializes a new instance of the ConvertOptions class.

public ConvertOptions();

ConvertOptions(ConvertOptions) Constructor

Initializes a new instance of the ConvertOptions class by copying another ConvertOptions object.

public ConvertOptions(DiGi.Core.Classes.ConvertOptions? convertOptions);

Parameters

convertOptions ConvertOptions

The source options to copy from.

ConvertOptions(JsonObject) Constructor

Initializes a new instance of the ConvertOptions class from a JsonObject.

public ConvertOptions(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing conversion options.

Coordinates Class

Represents a geographic location using Latitude and Longitude.

public class Coordinates : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ICoordinates, DiGi.Core.Interfaces.ILocation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObjectSerializableObject → Coordinates

Implements ICoordinates, ILocation, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

Coordinates(Coordinates) Constructor

Initializes a new instance of the Coordinates class by copying another Coordinates object.

public Coordinates(DiGi.Core.Classes.Coordinates? coordinates);

Parameters

coordinates Coordinates

The source coordinates to copy from.

Coordinates(double, double) Constructor

Initializes a new instance of the Coordinates class with specified latitude and longitude.

public Coordinates(double latitude, double longitude);

Parameters

latitude System.Double

The geographic latitude.

longitude System.Double

The geographic longitude.

Coordinates(JsonObject) Constructor

Initializes a new instance of the Coordinates class from a JsonObject.

public Coordinates(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing coordinate data.

Properties

Coordinates.Latitude Property

Gets the geographic latitude of the location.

public double Latitude { get; }

Implements Latitude

Property Value

System.Double

Coordinates.Longitude Property

Gets the geographic longitude of the location.

public double Longitude { get; }

Implements Longitude

Property Value

System.Double

DateTimeCollection Class

Represents a collection of System.DateTime objects.

public class DateTimeCollection : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ITimeSeries, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, System.Collections.Generic.ICollection<System.DateTime>, System.Collections.Generic.IEnumerable<System.DateTime>, System.Collections.IEnumerable

Inheritance System.ObjectObjectSerializableObject → DateTimeCollection

Implements ITimeSeries, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject, System.Collections.Generic.ICollection<System.DateTime>, System.Collections.Generic.IEnumerable<System.DateTime>, System.Collections.IEnumerable

Constructors

DateTimeCollection() Constructor

Initializes a new instance of the DateTimeCollection class.

public DateTimeCollection();

DateTimeCollection(DateTimeCollection) Constructor

Initializes a new instance of the DateTimeCollection class by copying another collection.

public DateTimeCollection(DiGi.Core.Classes.DateTimeCollection? dateTimeCollection);

Parameters

dateTimeCollection DateTimeCollection

The DateTimeCollection to copy from.

DateTimeCollection(IEnumerable<DateTime>) Constructor

Initializes a new instance of the DateTimeCollection class with the specified collection of DateTimes.

public DateTimeCollection(System.Collections.Generic.IEnumerable<System.DateTime>? dateTimes);

Parameters

dateTimes System.Collections.Generic.IEnumerable<System.DateTime>

The collection of date times to initialize the collection with.

DateTimeCollection(JsonObject) Constructor

Initializes a new instance of the DateTimeCollection class from a JSON object.

public DateTimeCollection(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the collection from.

Properties

DateTimeCollection.Count Property

Gets the number of elements contained in the collection.

public int Count { get; }

Implements Count

Property Value

System.Int32

DateTimeCollection.DateTimes Property

Gets the list of DateTimes in the collection.

public System.Collections.Generic.IList<System.DateTime> DateTimes { get; }

Property Value

System.Collections.Generic.IList<System.DateTime>

DateTimeCollection.IsReadOnly Property

Gets a value indicating whether the collection is read-only.

public bool IsReadOnly { get; }

Implements IsReadOnly

Property Value

System.Boolean

Methods

DateTimeCollection.Add(DateTime) Method

Adds the specified DateTime to the collection.

public void Add(System.DateTime dateTime);

Parameters

dateTime System.DateTime

The DateTime to add to the collection.

DateTimeCollection.Add(Nullable<DateTime>) Method

Adds the specified nullable DateTime to the collection.

public void Add(System.Nullable<System.DateTime> dateTime);

Parameters

dateTime System.Nullable<System.DateTime>

The nullable DateTime to add to the collection.

DateTimeCollection.Clear() Method

Removes all elements from the collection.

public void Clear();

Implements Clear()

DateTimeCollection.Contains(DateTime) Method

Determines whether the collection contains a specific DateTime.

public bool Contains(System.DateTime dateTime);

Parameters

dateTime System.DateTime

The DateTime to locate in the collection.

Returns

System.Boolean
true if the collection contains the specified DateTime; otherwise, false.

DateTimeCollection.Contains(Nullable<DateTime>) Method

Determines whether the collection contains a specific nullable DateTime.

public bool Contains(System.Nullable<System.DateTime> dateTime);

Parameters

dateTime System.Nullable<System.DateTime>

The nullable DateTime to locate in the collection.

Returns

System.Boolean
true if the collection contains the specified nullable DateTime; otherwise, false.

DateTimeCollection.CopyTo(DateTime[], int) Method

Copies the elements of the collection to a specified array, starting at the specified index.

public void CopyTo(System.DateTime[]? array, int arrayIndex);

Parameters

array System.DateTime[]

The destination array to which the elements are copied.

arrayIndex System.Int32

The zero-based index in the destination array at which the elements should be copied to.

DateTimeCollection.GetDateTimes() Method

Generates and returns an array of DateTimes within the series.

public System.DateTime[]? GetDateTimes();

Implements GetDateTimes()

Returns

System.DateTime[]
An array of DateTime objects containing the series, or null if no date times are available.

DateTimeCollection.GetEnumerator() Method

Returns an enumerator that iterates through the collection.

public System.Collections.Generic.IEnumerator<System.DateTime> GetEnumerator();

Implements GetEnumerator(), GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<System.DateTime>
An IEnumerator<DateTime> that iterates through the collection.

DateTimeCollection.Remove(DateTime) Method

Removes the first occurrence of a specific DateTime from the collection.

public bool Remove(System.DateTime dateTime);

Parameters

dateTime System.DateTime

The DateTime to remove from the collection.

Returns

System.Boolean
True if the item was successfully removed; otherwise, false.

DateTimeCollection.Remove(Nullable<DateTime>) Method

Removes the first occurrence of a specific nullable DateTime from the collection.

public bool Remove(System.Nullable<System.DateTime> dateTime);

Parameters

dateTime System.Nullable<System.DateTime>

The nullable DateTime to remove from the collection.

Returns

System.Boolean
True if the item was successfully removed; otherwise, false.

Operators

DateTimeCollection.implicit operator DateTimeCollection(List<DateTime>) Operator

Implicitly converts a nullable list of System.DateTime objects to a nullable DateTimeCollection.

public static DiGi.Core.Classes.DateTimeCollection? implicit operator DiGi.Core.Classes.DateTimeCollection?(System.Collections.Generic.List<System.DateTime>? dateTimes);

Parameters

dateTimes System.Collections.Generic.List<System.DateTime>

The nullable list of System.DateTime values to convert.

Returns

DateTimeCollection
A new DateTimeCollection containing the elements from the list, or null if the input is null.

DateTimeCollection.implicit operator DateTimeCollection(DateTime[]) Operator

Implicitly converts a nullable array of System.DateTime objects to a nullable DateTimeCollection.

public static DiGi.Core.Classes.DateTimeCollection? implicit operator DiGi.Core.Classes.DateTimeCollection?(System.DateTime[]? dateTimes);

Parameters

dateTimes System.DateTime[]

The nullable array of System.DateTime values to convert.

Returns

DateTimeCollection
A new DateTimeCollection containing the elements from the array, or null if the input is null.

DateTimeCollection.implicit operator DateTimeCollection(Nullable<DateTime>) Operator

Implicitly converts a nullable System.DateTime to a nullable DateTimeCollection.

public static DiGi.Core.Classes.DateTimeCollection? implicit operator DiGi.Core.Classes.DateTimeCollection?(System.Nullable<System.DateTime> dateTime);

Parameters

dateTime System.Nullable<System.DateTime>

The nullable System.DateTime value to convert.

Returns

DateTimeCollection
A new DateTimeCollection containing the specified date time, or null if the input is null.

DateTimeCollection.implicit operator List<DateTime>(DateTimeCollection) Operator

Implicitly converts a DateTimeCollection to a nullable list of System.DateTime.

public static System.Collections.Generic.List<System.DateTime>? implicit operator System.Collections.Generic.List<System.DateTime>?(DiGi.Core.Classes.DateTimeCollection? dateTimeCollection);

Parameters

dateTimeCollection DateTimeCollection

The DateTimeCollection instance to convert.

Returns

System.Collections.Generic.List<System.DateTime>
A System.Collections.Generic.List<> containing the date times from the collection, or null if the source is null.

DateTimeCollection.implicit operator DateTime[](DateTimeCollection) Operator

Implicitly converts a nullable DateTimeCollection to a nullable array of System.DateTime objects.

public static System.DateTime[]? implicit operator System.DateTime[]?(DiGi.Core.Classes.DateTimeCollection? dateTimeCollection);

Parameters

dateTimeCollection DateTimeCollection

The nullable DateTimeCollection to convert.

Returns

System.DateTime[]
A nullable array of System.DateTime values containing the elements from the collection, or null if the input is null.

DateTimeRange Class

Represents a range of date and time values.

public class DateTimeRange : DiGi.Core.Classes.Range<System.DateTime>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.Range<System.DateTime> → DateTimeRange

Constructors

DateTimeRange(DateTimeRange) Constructor

Initializes a new instance of the DateTimeRange class by copying an existing range.

public DateTimeRange(DiGi.Core.Classes.DateTimeRange dateTimeRange);

Parameters

dateTimeRange DateTimeRange

The date time range to copy from.

DateTimeRange(DateTime, DateTime) Constructor

Initializes a new instance of the DateTimeRange class with specified start and end dates.

public DateTimeRange(System.DateTime value_1, System.DateTime value_2);

Parameters

value_1 System.DateTime

The first date time value.

value_2 System.DateTime

The second date time value.

DateTimeRange(JsonObject) Constructor

Initializes a new instance of the DateTimeRange class from a JSON object.

public DateTimeRange(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the range from.

Properties

DateTimeRange.Length Property

Gets the duration or length of the date time range.

public override System.DateTime Length { get; }

Property Value

System.DateTime

DateTimeSeries Class

Represents a series of DateTimes generated based on a range and step interval.

public class DateTimeSeries : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ITimeSeries, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObjectSerializableObject → DateTimeSeries

Implements ITimeSeries, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

DateTimeSeries(DateTimeRange, long) Constructor

Initializes a new instance of the DateTimeSeries class with a specified range and step.

public DateTimeSeries(DiGi.Core.Classes.DateTimeRange? range, long step);

Parameters

range DateTimeRange

The date time range for the series.

step System.Int64

The step interval between dates in the series.

DateTimeSeries(DateTimeSeries) Constructor

Initializes a new instance of the DateTimeSeries class by copying another series.

public DateTimeSeries(DiGi.Core.Classes.DateTimeSeries? dateTimeSeries);

Parameters

dateTimeSeries DateTimeSeries

The source DateTimeSeries to copy from.

DateTimeSeries(DateTime) Constructor

Initializes a new instance of the DateTimeSeries class starting at the specified date.

public DateTimeSeries(System.DateTime dateTime);

Parameters

dateTime System.DateTime

The start date and time for the series.

DateTimeSeries(DateTime, DateTime, long) Constructor

Initializes a new instance of the DateTimeSeries class with start date, end date, and step.

public DateTimeSeries(System.DateTime dateTime_1, System.DateTime dateTime_2, long step);

Parameters

dateTime_1 System.DateTime

The starting date and time of the series.

dateTime_2 System.DateTime

The ending date and time of the series.

step System.Int64

The step interval for the series.

DateTimeSeries(JsonObject) Constructor

Initializes a new instance of the DateTimeSeries class from a JSON object.

public DateTimeSeries(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the series.

Properties

DateTimeSeries.Range Property

Gets or sets the date range for the series.

public DiGi.Core.Classes.DateTimeRange? Range { get; }

Property Value

DateTimeRange

DateTimeSeries.Step Property

Gets or sets the step interval for the series.

public long Step { get; }

Property Value

System.Int64

Methods

DateTimeSeries.GetDateTimes() Method

Generates and returns an array of DateTimes within the series.

public System.DateTime[]? GetDateTimes();

Implements GetDateTimes()

Returns

System.DateTime[]
An array of System.DateTime objects representing the series, or null.

ExternalReference Class

Base class for references to external resources.

public abstract class ExternalReference : DiGi.Core.Classes.SerializableReference, DiGi.Core.Interfaces.IExternalReference, DiGi.Core.Interfaces.IReference, DiGi.Core.Interfaces.IObject, System.IEquatable<DiGi.Core.Interfaces.IReference>

Inheritance System.ObjectObjectSerializableObjectSerializableReference → ExternalReference

Derived
ExternalReference<USerializableReference>

Implements IExternalReference, IReference, IObject, System.IEquatable<IReference>

Constructors

ExternalReference(ExternalReference) Constructor

Initializes a new instance of the ExternalReference class by copying an existing reference.

public ExternalReference(DiGi.Core.Classes.ExternalReference? externalReference);

Parameters

externalReference ExternalReference

The external reference to copy.

ExternalReference(string) Constructor

Initializes a new instance of the ExternalReference class with a specified source.

public ExternalReference(string? source);

Parameters

source System.String

The source string for the external reference.

ExternalReference(JsonObject) Constructor

Initializes a new instance of the ExternalReference class from a JSON object.

public ExternalReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the reference.

Properties

ExternalReference.Source Property

Gets or sets the source identifier for the external reference.

public string Source { get; }

Property Value

System.String

ExternalReference<USerializableReference> Class

Base class for references to external resources.

public abstract class ExternalReference<USerializableReference> : DiGi.Core.Classes.ExternalReference
    where USerializableReference : DiGi.Core.Interfaces.ISerializableReference

Type parameters

USerializableReference

The type of the serializable reference.

Inheritance System.ObjectObjectSerializableObjectSerializableReferenceExternalReference → ExternalReference<USerializableReference>

Derived
InstanceRelatedExternalReference<TInstanceRelatedSerializableReference>
TypeRelatedExternalReference

Constructors

ExternalReference(ExternalReference<USerializableReference>) Constructor

Initializes a new instance of the ExternalReference class by copying an existing generic reference.

public ExternalReference(DiGi.Core.Classes.ExternalReference<USerializableReference>? externalReference);

Parameters

externalReference DiGi.Core.Classes.ExternalReference<USerializableReference>

The external reference to copy from.

ExternalReference(string, USerializableReference) Constructor

Initializes a new instance of the ExternalReference class with a specified source and serializable reference.

public ExternalReference(string? source, USerializableReference? reference);

Parameters

source System.String

The source of the external reference.

reference USerializableReference

The serializable reference to use.

ExternalReference(JsonObject) Constructor

Initializes a new instance of the ExternalReference class from a JSON object.

public ExternalReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Properties

ExternalReference<USerializableReference>.Reference Property

Gets or sets the serializable reference object.

public USerializableReference? Reference { get; }

Property Value

USerializableReference

Methods

ExternalReference<USerializableReference>.ToString() Method

Returns a string representation of the external reference.

public override string? ToString();

Returns

System.String
A string that represents the current object.

ExternalReferenceGuidResult<TUniqueObject,UExternalReference> Class

Represents a result containing an external reference GUID.

public abstract class ExternalReferenceGuidResult<TUniqueObject,UExternalReference> : DiGi.Core.Classes.GuidResult<TUniqueObject>
    where TUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where UExternalReference : DiGi.Core.Interfaces.IExternalReference

Type parameters

TUniqueObject

The type of the unique object.

UExternalReference

The type of the external reference.

Inheritance System.ObjectObjectSerializableObjectUniqueObjectGuidObjectGuidResultDiGi.Core.Classes.GuidResult<TUniqueObject> → ExternalReferenceGuidResult<TUniqueObject,UExternalReference>

Constructors

ExternalReferenceGuidResult() Constructor

Initializes a new instance of the ExternalReferenceGuidResult<TUniqueObject,UExternalReference> class.

public ExternalReferenceGuidResult();

ExternalReferenceGuidResult(ExternalReferenceGuidResult<TUniqueObject,UExternalReference>) Constructor

Initializes a new instance of the ExternalReferenceGuidResult<TUniqueObject,UExternalReference> class from another external reference GUID result.

public ExternalReferenceGuidResult(DiGi.Core.Classes.ExternalReferenceGuidResult<TUniqueObject,UExternalReference>? externalReferenceGuidResult);

Parameters

externalReferenceGuidResult DiGi.Core.Classes.ExternalReferenceGuidResult<TUniqueObject,UExternalReference>

The external reference GUID result to copy from.

ExternalReferenceGuidResult(JsonObject) Constructor

Initializes a new instance of the ExternalReferenceGuidResult<TUniqueObject,UExternalReference> class from the specified JSON object.

public ExternalReferenceGuidResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

ExternalReferenceGuidResult(UExternalReference) Constructor

Initializes a new instance of the ExternalReferenceGuidResult<TUniqueObject,UExternalReference> class with the specified external reference.

public ExternalReferenceGuidResult(UExternalReference? reference);

Parameters

reference UExternalReference

The external reference to use.

Properties

ExternalReferenceGuidResult<TUniqueObject,UExternalReference>.Reference Property

Gets or sets the associated external reference.

public UExternalReference? Reference { get; }

Property Value

UExternalReference

ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> Class

Represents a result containing an external reference unique identifier.

public abstract class ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> : DiGi.Core.Classes.UniqueResult<TUniqueObject>
    where TUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where UExternalReference : DiGi.Core.Interfaces.IExternalReference

Type parameters

TUniqueObject

The type of the unique object.

UExternalReference

The type of the external reference.

Inheritance System.ObjectObjectSerializableObjectUniqueObjectUniqueResultDiGi.Core.Classes.UniqueResult<TUniqueObject> → ExternalReferenceUniqueResult<TUniqueObject,UExternalReference>

Constructors

ExternalReferenceUniqueResult() Constructor

Initializes a new instance of the ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> class.

public ExternalReferenceUniqueResult();

ExternalReferenceUniqueResult(ExternalReferenceUniqueResult<TUniqueObject,UExternalReference>) Constructor

Initializes a new instance of the ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> class from another external reference unique result.

public ExternalReferenceUniqueResult(DiGi.Core.Classes.ExternalReferenceUniqueResult<TUniqueObject,UExternalReference>? externalReferenceUniqueResult);

Parameters

externalReferenceUniqueResult DiGi.Core.Classes.ExternalReferenceUniqueResult<TUniqueObject,UExternalReference>

The external reference unique result to initialize from.

ExternalReferenceUniqueResult(JsonObject) Constructor

Initializes a new instance of the ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> class from the specified JSON object.

public ExternalReferenceUniqueResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

ExternalReferenceUniqueResult(UExternalReference) Constructor

Initializes a new instance of the ExternalReferenceUniqueResult<TUniqueObject,UExternalReference> class with the specified external reference.

public ExternalReferenceUniqueResult(UExternalReference? reference);

Parameters

reference UExternalReference

The external reference to initialize with.

Properties

ExternalReferenceUniqueResult<TUniqueObject,UExternalReference>.Reference Property

Gets or sets the associated external reference.

public UExternalReference? Reference { get; }

Property Value

UExternalReference

GuidExternalReference Class

Represents an external reference identified by a GUID.

public sealed class GuidExternalReference : DiGi.Core.Classes.UniqueExternalReference<DiGi.Core.Classes.GuidReference>

Inheritance System.ObjectObjectSerializableObjectSerializableReferenceExternalReferenceDiGi.Core.Classes.ExternalReference<GuidReference>DiGi.Core.Classes.InstanceRelatedExternalReference<GuidReference>DiGi.Core.Classes.UniqueExternalReference<GuidReference> → GuidExternalReference

Constructors

GuidExternalReference(GuidExternalReference) Constructor

Initializes a new instance of the GuidExternalReference class by copying an existing instance.

public GuidExternalReference(DiGi.Core.Classes.GuidExternalReference guidExternalReference);

Parameters

guidExternalReference GuidExternalReference

The existing instance to copy.

GuidExternalReference(string, GuidReference) Constructor

Initializes a new instance of the GuidExternalReference class with a source and a GUID reference.

public GuidExternalReference(string source, DiGi.Core.Classes.GuidReference reference);

Parameters

source System.String

The source string.

reference GuidReference

The GUID reference.

GuidExternalReference(string, IGuidObject) Constructor

Initializes a new instance of the GuidExternalReference class with a source and a GUID object.

public GuidExternalReference(string? source, DiGi.Core.Interfaces.IGuidObject? guidObject);

Parameters

source System.String

The source string.

guidObject IGuidObject

The GUID object.

GuidExternalReference(JsonObject) Constructor

Initializes a new instance of the GuidExternalReference class from a JSON object.

public GuidExternalReference(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

GuidModel Class

Provides a base implementation for models identified by a unique GUID.

public abstract class GuidModel : DiGi.Core.Classes.GuidObject, DiGi.Core.Interfaces.IGuidModel, DiGi.Core.Interfaces.ISerializableModel, DiGi.Core.Interfaces.IModel, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IGuidObject, DiGi.Core.Interfaces.IUniqueObject

Inheritance System.ObjectObjectSerializableObjectUniqueObjectGuidObject → GuidModel

Implements IGuidModel, ISerializableModel, IModel, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IGuidObject, IUniqueObject

Constructors

GuidModel() Constructor

Initializes a new instance of the GuidModel class.

public GuidModel();

GuidModel(GuidModel) Constructor

Initializes a new instance of the GuidModel class by copying another instance.

public GuidModel(DiGi.Core.Classes.GuidModel? guidModel);

Parameters

guidModel GuidModel

The GuidModel instance to copy from.

GuidModel(Guid) Constructor

Initializes a new instance of the GuidModel class with a specified GUID.

public GuidModel(System.Guid guid);

Parameters

guid System.Guid

The GUID value to initialize the model with.

GuidModel(JsonObject) Constructor

Initializes a new instance of the GuidModel class from a JSON object.

public GuidModel(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the model from.

GuidObject Class

Base class for objects identified by a unique GUID.

public abstract class GuidObject : DiGi.Core.Classes.UniqueObject, DiGi.Core.Interfaces.IGuidObject, DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObjectSerializableObjectUniqueObject → GuidObject

Derived
GuidModel
GuidResult

Implements IGuidObject, IUniqueObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

GuidObject() Constructor

Initializes a new instance of the GuidObject class.

public GuidObject();

GuidObject(GuidObject) Constructor

Initializes a new instance of the GuidObject class by copying another GuidObject.

public GuidObject(DiGi.Core.Classes.GuidObject? guidObject);

Parameters

guidObject GuidObject

The GuidObject to copy from.

GuidObject(Guid) Constructor

Initializes a new instance of the GuidObject class with the specified GUID.

public GuidObject(System.Guid guid);

Parameters

guid System.Guid

The GUID to assign to the new instance.

GuidObject(Guid, GuidObject) Constructor

Initializes a new instance of the GuidObject class with a specified GUID and an existing object.

public GuidObject(System.Guid guid, DiGi.Core.Classes.GuidObject? guidObject);

Parameters

guid System.Guid

The GUID to assign to the new instance.

guidObject GuidObject

The existing GuidObject used for initialization.

GuidObject(JsonObject) Constructor

Initializes a new instance of the GuidObject class from a JSON object.

public GuidObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the instance from.

Properties

GuidObject.Guid Property

Gets or sets the unique identifier for the object.

public System.Guid Guid { get; }

Implements Guid

Property Value

System.Guid

GuidObject.UniqueId Property

Gets or sets the unique identification string for this object.

public override string? UniqueId { get; }

Implements UniqueId

Property Value

System.String

Methods

GuidObject.Duplicate(Nullable<Guid>) Method

Creates a duplicate of the current object, optionally using a new GUID.

public virtual DiGi.Core.Interfaces.IGuidObject? Duplicate(System.Nullable<System.Guid> guid=null);

Parameters

guid System.Nullable<System.Guid>

The optional GUID to assign to the duplicated object.

Implements Duplicate(Nullable<Guid>)

Returns

IGuidObject
A duplicate of the current object as an IGuidObject.

GuidPropertyReference Class

Represents a reference to a specific property of an object identified by a GUID.

public class GuidPropertyReference : DiGi.Core.Classes.UniquePropertyReference<DiGi.Core.Classes.GuidReference>

Inheritance System.ObjectObjectSerializableObjectSerializableReferencePropertyReferenceDiGi.Core.Classes.PropertyReference<GuidReference>DiGi.Core.Classes.UniquePropertyReference<GuidReference> → GuidPropertyReference

Constructors

GuidPropertyReference(GuidPropertyReference) Constructor

Initializes a new instance of the GuidPropertyReference class by copying an existing reference.

public GuidPropertyReference(DiGi.Core.Classes.GuidPropertyReference guidPropertyReference);

Parameters

guidPropertyReference GuidPropertyReference

The existing reference to copy.

GuidPropertyReference(GuidReference, string) Constructor

Initializes a new instance of the GuidPropertyReference class with the specified reference and property name.

public GuidPropertyReference(DiGi.Core.Classes.GuidReference reference, string propertyName);

Parameters

reference GuidReference

The reference to use.

propertyName System.String

The name of the property.

GuidPropertyReference(JsonObject) Constructor

Initializes a new instance of the GuidPropertyReference class from the specified JSON object.

public GuidPropertyReference(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Methods

GuidPropertyReference.Clone() Method

Creates a shallow copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject Clone();

Implements Clone()

Returns

ISerializableObject
A shallow copy of the current object.

GuidReference Class

Represents a reference to an object identified by a GUID.

public class GuidReference : DiGi.Core.Classes.UniqueReference

Inheritance System.ObjectObjectSerializableObjectSerializableReferenceUniqueReference → GuidReference

Constructors

GuidReference(GuidReference) Constructor

Initializes a new instance of the GuidReference class by copying an existing reference.

public GuidReference(DiGi.Core.Classes.GuidReference? guidReference);

Parameters

guidReference GuidReference

The existing reference to copy.

GuidReference(TypeReference, Guid) Constructor

Initializes a new instance of the GuidReference class using a type reference and a GUID.

public GuidReference(DiGi.Core.Classes.TypeReference? typeReference, System.Guid guid);

Parameters

typeReference TypeReference

The type reference to use.

guid System.Guid

The GUID value to assign.

GuidReference(IGuidObject) Constructor

Initializes a new instance of the GuidReference class from a GUID object.

public GuidReference(DiGi.Core.Interfaces.IGuidObject? guidObject);

Parameters

guidObject IGuidObject

The GUID object to initialize from.

GuidReference(string, Guid) Constructor

Initializes a new instance of the GuidReference class using a type name and a GUID.

public GuidReference(string? fullTypeName, System.Guid guid);

Parameters

fullTypeName System.String

The full name of the type.

guid System.Guid

The unique identifier for the reference.

GuidReference(JsonObject) Constructor

Initializes a new instance of the GuidReference class from a JSON object.

public GuidReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Properties

GuidReference.Guid Property

Gets the GUID value of the reference.

public System.Guid Guid { get; }

Property Value

System.Guid

GuidReference.UniqueId Property

Gets the unique identifier for the reference.

public override string? UniqueId { get; }

Implements UniqueId

Property Value

System.String

Methods

GuidReference.Clone() Method

Creates a deep copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new ISerializableObject that is a copy of the current object.

GuidReference.ToString() Method

Returns a string representation of the current object.

public override string? ToString();

Returns

System.String
A string that represents the current object.

GuidResult Class

Represents a result containing a GUID.

public abstract class GuidResult : DiGi.Core.Classes.GuidObject, DiGi.Core.Interfaces.IGuidResult, DiGi.Core.Interfaces.IUniqueResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IUniqueObject

Inheritance System.ObjectObjectSerializableObjectUniqueObjectGuidObject → GuidResult

Derived
GuidResult<TUniqueObject>

Implements IGuidResult, IUniqueResult, ISerializableResult, IResult, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IUniqueObject

Constructors

GuidResult() Constructor

Initializes a new instance of the GuidResult class.

public GuidResult();

GuidResult(GuidResult) Constructor

Initializes a new instance of the GuidResult class from another GUID result.

public GuidResult(DiGi.Core.Classes.GuidResult? guidResult);

Parameters

guidResult GuidResult

The GUID result to initialize from.

GuidResult(JsonObject) Constructor

Initializes a new instance of the GuidResult class from the specified JSON object.

public GuidResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

GuidResult<TUniqueObject> Class

Represents a result containing a GUID.

public abstract class GuidResult<TUniqueObject> : DiGi.Core.Classes.GuidResult, DiGi.Core.Interfaces.IUniqueResult<TUniqueObject>, DiGi.Core.Interfaces.IUniqueResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IUniqueObject
    where TUniqueObject : DiGi.Core.Interfaces.IUniqueObject

Type parameters

TUniqueObject

The type of the unique object associated with the GUID result.

Inheritance System.ObjectObjectSerializableObjectUniqueObjectGuidObjectGuidResult → GuidResult<TUniqueObject>

Derived
ExternalReferenceGuidResult<TUniqueObject,UExternalReference>

Implements DiGi.Core.Interfaces.IUniqueResult<TUniqueObject>, IUniqueResult, ISerializableResult, IResult, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IUniqueObject

Constructors

GuidResult() Constructor

Initializes a new instance of the GuidResult class.

public GuidResult();

GuidResult(GuidResult<TUniqueObject>) Constructor

Initializes a new instance of the GuidResult class from a generic GUID result.

public GuidResult(DiGi.Core.Classes.GuidResult<TUniqueObject>? guidResult);

Parameters

guidResult DiGi.Core.Classes.GuidResult<TUniqueObject>

The generic GUID result to initialize from.

GuidResult(JsonObject) Constructor

Initializes a new instance of the GuidResult class from the specified JSON object.

public GuidResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

IndexedBools Class

Represents a collection of boolean values mapped to integer indices.

public class IndexedBools : DiGi.Core.Classes.IndexedObjects<bool>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.IndexedObjects<System.Boolean> → IndexedBools

Constructors

IndexedBools() Constructor

Initializes a new instance of the IndexedBools class.

public IndexedBools();

IndexedBools(IndexedBools) Constructor

Initializes a new instance of the IndexedBools class by copying another instance.

public IndexedBools(DiGi.Core.Classes.IndexedBools indexedDoubles);

Parameters

indexedDoubles IndexedBools

The source IndexedBools instance to copy from.

IndexedBools(int, int, bool) Constructor

Initializes a new instance of the IndexedBools class with a range of indices set to the same value.

public IndexedBools(int startIndex, int count, bool value);

Parameters

startIndex System.Int32

The starting index of the range.

count System.Int32

The number of elements in the range.

value System.Boolean

The boolean value to assign to each element in the range.

IndexedBools(IEnumerable<bool>) Constructor

Initializes a new instance of the IndexedBools class from a collection of boolean values.

public IndexedBools(System.Collections.Generic.IEnumerable<bool> values);

Parameters

values System.Collections.Generic.IEnumerable<System.Boolean>

The collection of boolean values to use for initialization.

IndexedBools(IEnumerable<bool>, int) Constructor

Initializes a new instance of the IndexedBools class from a collection of boolean values starting at a specified index.

public IndexedBools(System.Collections.Generic.IEnumerable<bool> values, int startIndex);

Parameters

values System.Collections.Generic.IEnumerable<System.Boolean>

The collection of boolean values to use for initialization.

startIndex System.Int32

The starting index for the provided values.

IndexedBools(JsonObject) Constructor

Initializes a new instance of the IndexedBools class from a JSON object.

public IndexedBools(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the instance from.

IndexedDoubles Class

Represents a collection of double-precision floating-point values mapped to integer indices.

public class IndexedDoubles : DiGi.Core.Classes.IndexedObjects<double>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.IndexedObjects<System.Double> → IndexedDoubles

Constructors

IndexedDoubles() Constructor

Initializes a new instance of the IndexedDoubles class.

public IndexedDoubles();

IndexedDoubles(IndexedDoubles) Constructor

Initializes a new instance of the IndexedDoubles class by copying another instance.

public IndexedDoubles(DiGi.Core.Classes.IndexedDoubles indexedDoubles);

Parameters

indexedDoubles IndexedDoubles

The source IndexedDoubles instance to copy.

IndexedDoubles(int, int, double) Constructor

Initializes a new instance of the IndexedDoubles class with a range of indices set to the same value.

public IndexedDoubles(int startIndex, int count, double value);

Parameters

startIndex System.Int32

The starting index for the range.

count System.Int32

The number of elements in the range.

value System.Double

The value to assign to each element in the range.

IndexedDoubles(IEnumerable<double>) Constructor

Initializes a new instance of the IndexedDoubles class from a collection of double values.

public IndexedDoubles(System.Collections.Generic.IEnumerable<double> values);

Parameters

values System.Collections.Generic.IEnumerable<System.Double>

The collection of double values to initialize with.

IndexedDoubles(IEnumerable<double>, int) Constructor

Initializes a new instance of the IndexedDoubles class from a collection of double values starting at a specified index.

public IndexedDoubles(System.Collections.Generic.IEnumerable<double> values, int startIndex);

Parameters

values System.Collections.Generic.IEnumerable<System.Double>

The collection of double values to initialize with.

startIndex System.Int32

The starting index for the provided values.

IndexedDoubles(JsonObject) Constructor

Initializes a new instance of the IndexedDoubles class from a JSON object.

public IndexedDoubles(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Methods

IndexedDoubles.GetAverage() Method

Calculates and returns the average of all stored values.

public double GetAverage();

Returns

System.Double
The calculated average of the stored values.

IndexedDoubles.GetMaxValue() Method

Returns the maximum value present in the collection.

public double GetMaxValue();

Returns

System.Double
The maximum double value found in the collection.

IndexedDoubles.GetMaxValueIndex() Method

Returns the index of the maximum value in the collection.

public int GetMaxValueIndex();

Returns

System.Int32
The zero-based index of the maximum value.

IndexedDoubles.GetMinValue() Method

Returns the minimum value present in the collection.

public double GetMinValue();

Returns

System.Double
The minimum value found in the collection.

IndexedDoubles.GetMinValueIndex() Method

Returns the index of the minimum value in the collection.

public int GetMinValueIndex();

Returns

System.Int32
The zero-based index of the minimum value.

IndexedDoubles.GetSum() Method

Calculates and returns the sum of all stored values.

public double GetSum();

Returns

System.Double
The total sum of all stored values.

IndexedDoubles.Sum(IndexedDoubles) Method

Adds the values from another IndexedDoubles instance to the current collection.

public void Sum(DiGi.Core.Classes.IndexedDoubles indexedDoubles);

Parameters

indexedDoubles IndexedDoubles

The IndexedDoubles instance containing the values to be added.

IndexedObjects<T> Class

Represents a generic collection of objects mapped to integer indices.

public class IndexedObjects<T> : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.IIndexedObjects<T>, DiGi.Core.Interfaces.IIndexedObjects, DiGi.Core.Interfaces.IObject, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable<T>

Type parameters

T

The type of elements in the collection.

Inheritance System.ObjectObjectSerializableObject → IndexedObjects<T>

Derived
IndexedBools
IndexedDoubles

Implements DiGi.Core.Interfaces.IIndexedObjects<T>, IIndexedObjects, IObject, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable<T>

Constructors

IndexedObjects() Constructor

Initializes a new instance of the IndexedObjects<T> class.

public IndexedObjects();

IndexedObjects(IndexedObjects<T>) Constructor

Initializes a new instance of the IndexedObjects<T> class by copying another instance.

public IndexedObjects(DiGi.Core.Classes.IndexedObjects<T>? indexedObjects);

Parameters

indexedObjects DiGi.Core.Classes.IndexedObjects<T>

The existing instance to copy from.

IndexedObjects(int, int, T) Constructor

Initializes a new instance of the IndexedObjects<T> class with a range of indices set to the same value.

public IndexedObjects(int startIndex, int count, T? value);

Parameters

startIndex System.Int32

The starting index of the range.

count System.Int32

The number of elements in the range.

value T

The value to assign to each element in the range.

IndexedObjects(IEnumerable<T>) Constructor

Initializes a new instance of the IndexedObjects<T> class from a collection of values.

public IndexedObjects(System.Collections.Generic.IEnumerable<T>? values);

Parameters

values System.Collections.Generic.IEnumerable<T>

The collection of values to initialize the collection.

IndexedObjects(IEnumerable<T>, int) Constructor

Initializes a new instance of the IndexedObjects<T> class from a collection of values starting at a specified index.

public IndexedObjects(System.Collections.Generic.IEnumerable<T>? values, int startIndex);

Parameters

values System.Collections.Generic.IEnumerable<T>

The collection of values to initialize the collection.

startIndex System.Int32

The starting index for the collection of values.

IndexedObjects(SortedDictionary<int,T>) Constructor

Initializes a new instance of the IndexedObjects<T> class from a sorted dictionary of indices and values.

public IndexedObjects(System.Collections.Generic.SortedDictionary<int,T?>? sortedDictionary);

Parameters

sortedDictionary System.Collections.Generic.SortedDictionary<System.Int32,T>

The sorted dictionary containing indices and values to initialize the collection.

IndexedObjects(JsonObject) Constructor

Initializes a new instance of the IndexedObjects<T> class from a JSON object.

public IndexedObjects(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the collection.

Properties

IndexedObjects<T>.Count Property

Gets the number of elements contained in the collection.

public int Count { get; }

Property Value

System.Int32

IndexedObjects<T>.Keys Property

Gets the collection of all indices currently stored.

public System.Collections.Generic.IEnumerable<int>? Keys { get; }

Property Value

System.Collections.Generic.IEnumerable<System.Int32>

IndexedObjects<T>.this[int] Property

Gets or sets the value associated with the specified index.

public T? this[int index] { get; set; }

Parameters

index System.Int32

The index of the element to get or set.

Property Value

T

IndexedObjects<T>.Values Property

Gets the collection of all values currently stored.

public System.Collections.Generic.IEnumerable<T?>? Values { get; }

Property Value

System.Collections.Generic.IEnumerable<T>

Methods

IndexedObjects<T>.Add(Range<int>, T) Method

Adds or updates values across a specified range of indices. Returns true if the operation succeeded.

public bool Add(DiGi.Core.Classes.Range<int> range, T? value);

Parameters

range DiGi.Core.Classes.Range<System.Int32>

The range of indices to update.

value T

The value to add or update.

Returns

System.Boolean
True if the operation succeeded; otherwise, false.

IndexedObjects<T>.Add(int, T) Method

Adds or updates a value at the specified index. Returns true if the operation succeeded.

public bool Add(int index, T? value);

Parameters

index System.Int32

The index at which to add or update the value.

value T

The value to add or update.

Returns

System.Boolean
True if the operation succeeded; otherwise, false.

IndexedObjects<T>.ContainsIndex(int) Method

Determines whether the collection contains an element at the specified index.

public bool ContainsIndex(int index);

Parameters

index System.Int32

The index to check for existence.

Returns

System.Boolean
True if the collection contains an element at the specified index; otherwise, false.

IndexedObjects<T>.FromJsonObject(JsonObject) Method

Populates the current instance from a JSON object. Returns true if successful.

public override bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to populate the instance from.

Implements FromJsonObject(JsonObject)

Returns

System.Boolean
True if the population was successful; otherwise, false.

IndexedObjects<T>.GetEnumerator() Method

Returns an enumerator that iterates through the collection of values.

public System.Collections.Generic.IEnumerator<T> GetEnumerator();

Implements GetEnumerator(), GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T>
An enumerator that iterates through the collection.

IndexedObjects<T>.GetMaxIndex() Method

Gets the highest index present in the collection, or null if empty.

public System.Nullable<int> GetMaxIndex();

Returns

System.Nullable<System.Int32>
The maximum index present in the collection, or null if the collection is empty.

IndexedObjects<T>.GetMinIndex() Method

Gets the lowest index present in the collection, or null if empty.

public System.Nullable<int> GetMinIndex();

Returns

System.Nullable<System.Int32>
The minimum index present in the collection, or null if the collection is empty.

IndexedObjects<T>.GetValue(int) Method

Retrieves the value at the specified index.

public T? GetValue(int index);

Parameters

index System.Int32

The zero-based index of the element to get.

Returns

T
The value at the specified index, or null if not found.

IndexedObjects<T>.GetValues(Range<int>) Method

Retrieves a list of values within the specified range.

public System.Collections.Generic.List<T?>? GetValues(DiGi.Core.Classes.Range<int>? range);

Parameters

range DiGi.Core.Classes.Range<System.Int32>

The range of indices from which to retrieve values.

Returns

System.Collections.Generic.List<T>
A list of values within the specified range, or null if no values are found.

IndexedObjects<T>.GetValues(Range<int>, bool) Method

Retrieves a list of values within the specified range, with an option to bound the results.

public System.Collections.Generic.List<T?>? GetValues(DiGi.Core.Classes.Range<int>? range, bool bounded);

Parameters

range DiGi.Core.Classes.Range<System.Int32>

The range of indices from which to retrieve values.

bounded System.Boolean

A value indicating whether the results should be bounded.

Returns

System.Collections.Generic.List<T>
A list of values within the specified range, or null if no values are found.

IndexedObjects<T>.Remove(int) Method

Removes the element at the specified index. Returns true if the element was found and removed.

public bool Remove(int index);

Parameters

index System.Int32

The zero-based index of the element to remove.

Returns

System.Boolean
True if the element was successfully found and removed; otherwise, false.

IndexedObjects<T>.ToJsonObject() Method

Serializes the current instance into a JSON object.

public override System.Text.Json.Nodes.JsonObject? ToJsonObject();

Implements ToJsonObject()

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the current instance, or null.

IndexedObjects<T>.TryGetValue(int, T) Method

Attempts to get the value associated with the specified index. Returns true if found.

public bool TryGetValue(int index, out T? result);

Parameters

index System.Int32

The zero-based index of the element to get.

result T

When this method returns, contains the value associated with the specified index, if found; otherwise, the default value of the element type.

Returns

System.Boolean
True if the element was found; otherwise, false.

InstanceRelatedExternalReference Class

Represents a sealed implementation of an external reference related to a specific instance.

public sealed class InstanceRelatedExternalReference : DiGi.Core.Classes.InstanceRelatedExternalReference<DiGi.Core.Interfaces.IInstanceRelatedSerializableReference>

Inheritance System.ObjectObjectSerializableObjectSerializableReferenceExternalReferenceDiGi.Core.Classes.ExternalReference<IInstanceRelatedSerializableReference>DiGi.Core.Classes.InstanceRelatedExternalReference<IInstanceRelatedSerializableReference> → InstanceRelatedExternalReference

Constructors

InstanceRelatedExternalReference(InstanceRelatedExternalReference) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class by copying an existing reference.

public InstanceRelatedExternalReference(DiGi.Core.Classes.InstanceRelatedExternalReference? externalReference);

Parameters

externalReference InstanceRelatedExternalReference

The existing reference to copy.

InstanceRelatedExternalReference(string, IInstanceRelatedSerializableReference) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class with the specified source and interface-based reference.

public InstanceRelatedExternalReference(string? source, DiGi.Core.Interfaces.IInstanceRelatedSerializableReference? reference);

Parameters

source System.String

The source string.

reference IInstanceRelatedSerializableReference

The interface-based reference.

InstanceRelatedExternalReference(JsonObject) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class from the specified JSON object.

public InstanceRelatedExternalReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

InstanceRelatedExternalReference<TInstanceRelatedSerializableReference> Class

Represents an abstract base class for external references related to a specific instance.

public abstract class InstanceRelatedExternalReference<TInstanceRelatedSerializableReference> : DiGi.Core.Classes.ExternalReference<TInstanceRelatedSerializableReference>
    where TInstanceRelatedSerializableReference : DiGi.Core.Interfaces.IInstanceRelatedSerializableReference

Type parameters

TInstanceRelatedSerializableReference

The type of the serializable reference related to the instance.

Inheritance System.ObjectObjectSerializableObjectSerializableReferenceExternalReferenceDiGi.Core.Classes.ExternalReference<TInstanceRelatedSerializableReference> → InstanceRelatedExternalReference<TInstanceRelatedSerializableReference>

Derived
InstanceRelatedExternalReference
UniqueExternalReference<TUniqueReference>

Constructors

InstanceRelatedExternalReference(InstanceRelatedExternalReference<TInstanceRelatedSerializableReference>) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class by copying an existing generic reference.

public InstanceRelatedExternalReference(DiGi.Core.Classes.InstanceRelatedExternalReference<TInstanceRelatedSerializableReference>? externalReference);

Parameters

externalReference DiGi.Core.Classes.InstanceRelatedExternalReference<TInstanceRelatedSerializableReference>

The existing generic reference to copy.

InstanceRelatedExternalReference(string, TInstanceRelatedSerializableReference) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class with the specified source and reference.

public InstanceRelatedExternalReference(string? source, TInstanceRelatedSerializableReference? reference);

Parameters

source System.String

The source string.

reference TInstanceRelatedSerializableReference

The related serializable reference.

InstanceRelatedExternalReference(JsonObject) Constructor

Initializes a new instance of the InstanceRelatedExternalReference class from the specified JSON object.

public InstanceRelatedExternalReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

List<TKey_1,TKey_2,TValue> Class

Represents a base abstract list implementation.

public abstract class List<TKey_1,TKey_2,TValue> : DiGi.Core.Classes.Cluster<TKey_1, TKey_2, TValue>

Type parameters

TKey_1

The type of the first primary key.

TKey_2

The type of the second primary key.

TValue

The type of values contained in the list.

Inheritance System.ObjectDiGi.Core.Classes.Cluster<TKey_1,TKey_2,TValue> → List<TKey_1,TKey_2,TValue>

Derived
SerializableObjectListCluster<TKey_1,TKey_2,TValue>

Constructors

List() Constructor

Initializes a new instance of the List class.

public List();

List(List<TKey_1,TKey_2,TValue>) Constructor

Initializes a new instance of the List class from an existing value cluster.

public List(DiGi.Core.Classes.List<TKey_1,TKey_2,TValue>? valueCluster);

Parameters

valueCluster DiGi.Core.Classes.List<TKey_1,TKey_2,TValue>

The existing value cluster to initialize the list from.

List(IEnumerable<TValue>) Constructor

Initializes a new instance of the List class using the specified collection of values.

public List(System.Collections.Generic.IEnumerable<TValue>? values);

Parameters

values System.Collections.Generic.IEnumerable<TValue>

The collection of values used to initialize the list.

Methods

List<TKey_1,TKey_2,TValue>.Add(TValue) Method

Adds the specified value to the value cluster.

public override bool Add(TValue? value);

Parameters

value TValue

The value to add to the cluster.

Returns

System.Boolean
True if the element is successfully added; otherwise, false.

List<TKey_1,TKey_2,TValue>.Clear() Method

Removes all elements from the value cluster.

public override void Clear();

List<TKey_1,TKey_2,TValue>.Contains(TKey_1) Method

Determines whether the cluster contains an element with the specified primary key.

public override bool Contains(TKey_1? key_1);

Parameters

key_1 TKey_1

The primary key to locate in the cluster.

Returns

System.Boolean
True if the cluster contains an element with the specified primary key; otherwise, false.

List<TKey_1,TKey_2,TValue>.Contains(TKey_1, TKey_2) Method

Determines whether the cluster contains an element with the specified combination of keys.

public override bool Contains(TKey_1? key_1, TKey_2? key_2);

Parameters

key_1 TKey_1

The first key to search for.

key_2 TKey_2

The second key to search for.

Returns

System.Boolean
True if the cluster contains an element with the specified keys; otherwise, false.

List<TKey_1,TKey_2,TValue>.Contains(TValue) Method

Determines whether the cluster contains a specific value.

public override bool Contains(TValue? value);

Parameters

value TValue

The value to locate in the cluster.

Returns

System.Boolean
True if the cluster contains the specified value; otherwise, false.

List<TKey_1,TKey_2,TValue>.Equals(TValue, TValue) Method

Determines whether two specified values are equal.

public virtual bool Equals(TValue? value_1, TValue? value_2);

Parameters

value_1 TValue

The first value to compare.

value_2 TValue

The second value to compare.

Returns

System.Boolean
True if the specified values are equal; otherwise, false.

List<TKey_1,TKey_2,TValue>.GetIndexes<UValue>(TKey_1, TKey_2, Func<UValue,bool>) Method

Retrieves the indexes of elements that match the specified keys and predicate.

public virtual System.Collections.Generic.List<int>? GetIndexes<UValue>(TKey_1? key_1, TKey_2? key_2, System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of the value being evaluated by the predicate.

Parameters

key_1 TKey_1

The first key to search for.

key_2 TKey_2

The second key to search for.

func System.Func<UValue,System.Boolean>

A predicate function used to filter elements based on their value.

Returns

System.Collections.Generic.List<System.Int32>
A list of indexes that match the criteria, or null if no matches are found.

List<TKey_1,TKey_2,TValue>.GetKeys_1() Method

Returns a list of all primary keys in the cluster.

public override System.Collections.Generic.List<TKey_1>? GetKeys_1();

Returns

System.Collections.Generic.List<TKey_1>
A list containing all primary keys, or null if none exist.

List<TKey_1,TKey_2,TValue>.GetKeys_2(TKey_1) Method

Returns a list of secondary keys associated with the specified primary key.

public override System.Collections.Generic.List<TKey_2>? GetKeys_2(TKey_1? key_1);

Parameters

key_1 TKey_1

The primary key used to retrieve the secondary keys.

Returns

System.Collections.Generic.List<TKey_2>
A list of secondary keys associated with the specified primary key, or null if none are found.

List<TKey_1,TKey_2,TValue>.GetValue<UValue>(ListClusterReference<TKey_1,TKey_2>) Method

Retrieves a value using the provided cluster reference.

public UValue? GetValue<UValue>(DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>? listClusterReference)
    where UValue : TValue;

Type parameters

UValue

The type of value to retrieve.

Parameters

listClusterReference DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>

The cluster reference used to locate the value.

Returns

UValue
The retrieved value, or null if not found.

List<TKey_1,TKey_2,TValue>.GetValue<UValue>(Func<UValue,bool>) Method

Retrieves the first value that satisfies the specified predicate.

public override UValue? GetValue<UValue>(System.Func<UValue?,bool>? func)
    where UValue : TValue;

Type parameters

UValue

The type of value to retrieve.

Parameters

func System.Func<UValue,System.Boolean>

A predicate function used to find a matching value.

Returns

UValue
The first value that satisfies the predicate, or null if no match is found.

List<TKey_1,TKey_2,TValue>.GetValues<UValue>() Method

Returns all values contained in the list.

public override System.Collections.Generic.List<UValue> GetValues<UValue>()
    where UValue : TValue;

Type parameters

UValue

The type of values stored in the list.

Returns

System.Collections.Generic.List<UValue>
A list containing all values currently held in the cluster.

List<TKey_1,TKey_2,TValue>.GetValues<UValue>(IEnumerable<ListClusterReference<TKey_1,TKey_2>>) Method

Retrieves values associated with a collection of cluster references.

public System.Collections.Generic.List<UValue>? GetValues<UValue>(System.Collections.Generic.IEnumerable<DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>>? listClusterReferences)
    where UValue : TValue;

Type parameters

UValue

The type of values being retrieved.

Parameters

listClusterReferences System.Collections.Generic.IEnumerable<DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>>

The collection of cluster references to retrieve values for.

Returns

System.Collections.Generic.List<UValue>
A list of retrieved values, or null if no values were found.

List<TKey_1,TKey_2,TValue>.GetValues<UValue>(TKey_1) Method

Retrieves all values associated with the specified primary key.

public override System.Collections.Generic.List<UValue>? GetValues<UValue>(TKey_1? key_1)
    where UValue : TValue;

Type parameters

UValue

The type of value to retrieve.

Parameters

key_1 TKey_1

The primary key used for lookup.

Returns

System.Collections.Generic.List<UValue>
A list of values associated with the specified primary key, or null if none are found.

List<TKey_1,TKey_2,TValue>.GetValues<UValue>(TKey_1, TKey_2, IEnumerable<int>) Method

Retrieves values at the specified indexes for the given keys.

public System.Collections.Generic.List<UValue>? GetValues<UValue>(TKey_1? key_1, TKey_2? key_2, System.Collections.Generic.IEnumerable<int> indexes)
    where UValue : TValue;

Type parameters

UValue

The type of values being retrieved.

Parameters

key_1 TKey_1

The primary key used to locate the cluster.

key_2 TKey_2

The secondary key used to locate the element within the cluster.

indexes System.Collections.Generic.IEnumerable<System.Int32>

The collection of indexes from which to retrieve values.

Returns

System.Collections.Generic.List<UValue>
A list of values found at the specified indexes, or null if no values were found.

List<TKey_1,TKey_2,TValue>.GetValues<UValue>(TKey_1, TKey_2, Func<UValue,bool>) Method

Retrieves values that match the specified keys and predicate.

public System.Collections.Generic.List<UValue>? GetValues<UValue>(TKey_1? key_1, TKey_2? key_2, System.Func<UValue?,bool> func)
    where UValue : TValue;

Type parameters

UValue

The type of value to retrieve.

Parameters

key_1 TKey_1

The first key used for lookup.

key_2 TKey_2

The second key used for lookup.

func System.Func<UValue,System.Boolean>

A predicate function to filter the values.

Returns

System.Collections.Generic.List<UValue>
A list of values that match the specified keys and predicate, or null if none are found.

List<TKey_1,TKey_2,TValue>.Remove(IEnumerable<ListClusterReference<TKey_1,TKey_2>>) Method

Removes and returns values associated with the specified cluster references.

public System.Collections.Generic.List<TValue>? Remove(System.Collections.Generic.IEnumerable<DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>>? listClusterReferences);

Parameters

listClusterReferences System.Collections.Generic.IEnumerable<DiGi.Core.Classes.ListClusterReference<TKey_1,TKey_2>>

The collection of cluster references to remove.

Returns

System.Collections.Generic.List<TValue>
A list of removed values, or null if no values were found for the provided references.

List<TKey_1,TKey_2,TValue>.Remove(TKey_1) Method

Removes all elements associated with the specified primary key from the cluster.

public override bool Remove(TKey_1? key_1);

Parameters

key_1 TKey_1

The primary key of the elements to remove.

Returns

System.Boolean
True if one or more elements were removed; otherwise, false.

List<TKey_1,TKey_2,TValue>.Remove(TKey_1, TKey_2) Method

Removes the element associated with the specified combination of keys from the cluster.

public override bool Remove(TKey_1? key_1, TKey_2? key_2);

Parameters

key_1 TKey_1

The primary key of the element to remove.

key_2 TKey_2

The secondary key of the element to remove.

Returns

System.Boolean
True if the element was successfully removed; otherwise, false.

List<TKey_1,TKey_2,TValue>.Remove(TKey_1, TKey_2, int) Method

Removes and returns the value at the specified index for the given keys.

public TValue? Remove(TKey_1? key_1, TKey_2? key_2, int index);

Parameters

key_1 TKey_1

The primary key associated with the value to remove.

key_2 TKey_2

The secondary key associated with the value to remove.

index System.Int32

The index of the value to remove.

Returns

TValue
The removed value, or the default value of TValue if the element was not found.

List<TKey_1,TKey_2,TValue>.Remove(TKey_1, TKey_2, IEnumerable<int>) Method

Removes and returns values at the specified indexes for the given keys.

public System.Collections.Generic.List<TValue>? Remove(TKey_1? key_1, TKey_2? key_2, System.Collections.Generic.IEnumerable<int> indexes);

Parameters

key_1 TKey_1

The primary key associated with the values to remove.

key_2 TKey_2

The secondary key associated with the values to remove.

indexes System.Collections.Generic.IEnumerable<System.Int32>

A collection of indexes specifying which values to remove.

Returns

System.Collections.Generic.List<TValue>
A list containing the removed values, or null if no values were removed.

List<TKey_1,TKey_2,TValue>.Remove(TValue) Method

Removes the first occurrence of a specific value from the cluster.

public override bool Remove(TValue? value);

Parameters

value TValue

The value to remove from the cluster.

Returns

System.Boolean
True if the value was successfully removed; otherwise, false.

List<TKey_1,TKey_2,TValue>.TryGetIndex(TValue, TKey_1, TKey_2, int) Method

Attempts to find the primary key, secondary key, and index of a specific value.

public bool TryGetIndex(TValue? value, out TKey_1? key_1, out TKey_2? key_2, out int index);

Parameters

value TValue

The value to locate in the cluster.

key_1 TKey_1

When this method returns, contains the primary key associated with the specified value, if found; otherwise, the default value of TKey_1.

key_2 TKey_2

When this method returns, contains the secondary key associated with the specified value, if found; otherwise, the default value of TKey_2.

index System.Int32

When this method returns, contains the index of the specified value, if found; otherwise, 0.

Returns

System.Boolean
True if the primary key, secondary key, and index were found; otherwise, false.

ListClusterReference<TKey_1,TKey_2> Class

Provides an abstract base class for references to elements within a list cluster.

public abstract class ListClusterReference<TKey_1,TKey_2> : DiGi.Core.Interfaces.IReference, DiGi.Core.Interfaces.IObject, System.IEquatable<DiGi.Core.Interfaces.IReference>

Type parameters

TKey_1

The type of the first key.

TKey_2

The type of the second key.

Inheritance System.Object → ListClusterReference<TKey_1,TKey_2>

Implements IReference, IObject, System.IEquatable<IReference>

Constructors

ListClusterReference(TKey_1, TKey_2, int) Constructor

Provides an abstract base class for references to elements within a list cluster.

protected ListClusterReference(TKey_1? key_1, TKey_2? key_2, int index);

Parameters

key_1 TKey_1

key_2 TKey_2

index System.Int32

Properties

ListClusterReference<TKey_1,TKey_2>.Index Property

Gets or sets the index of the reference within the list cluster.

public int Index { get; }

Property Value

System.Int32

ListClusterReference<TKey_1,TKey_2>.Key_1 Property

Gets or sets the primary key associated with the reference.

public TKey_1? Key_1 { get; }

Property Value

TKey_1

ListClusterReference<TKey_1,TKey_2>.Key_2 Property

Gets or sets the secondary key associated with the reference.

public TKey_2? Key_2 { get; }

Property Value

TKey_2

Methods

ListClusterReference<TKey_1,TKey_2>.Equals(IReference) Method

Determines whether the specified reference is equal to the current reference.

public abstract bool Equals(DiGi.Core.Interfaces.IReference reference);

Parameters

reference IReference

The reference to compare with the current reference.

Returns

System.Boolean
true if the specified reference is equal to the current reference; otherwise, false.

LongProgressWrapper Class

Wraps progress reporting for long values.

public class LongProgressWrapper : DiGi.Core.Classes.ProgressWrapper<long>

Inheritance System.ObjectDiGi.Core.Classes.ProgressWrapper<System.Int64> → LongProgressWrapper

Constructors

LongProgressWrapper(long, IProgress<long>) Constructor

Initializes a new instance of the LongProgressWrapper class with an initial value.

public LongProgressWrapper(long initialValue, System.IProgress<long>? progress=null);

Parameters

initialValue System.Int64

The initial progress value.

progress System.IProgress<System.Int64>

An optional progress reporter.

LongProgressWrapper(IProgress<long>) Constructor

Initializes a new instance of the LongProgressWrapper class.

public LongProgressWrapper(System.IProgress<long>? progress=null);

Parameters

progress System.IProgress<System.Int64>

An optional progress reporter.

Methods

LongProgressWrapper.Increment(long) Method

Increments the current progress value and reports the update.

public long Increment(long value);

Parameters

value System.Int64

The amount to increment by.

Returns

System.Int64
The updated progress value.

MemorySizeSplitter<TSerializableObject> Class

Splits serializable objects by their serialized byte array size.

public class MemorySizeSplitter<TSerializableObject> : DiGi.Core.Classes.Splitter<TSerializableObject, long>
    where TSerializableObject : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TSerializableObject

The type of the serializable object.

Inheritance System.ObjectDiGi.Core.Classes.Splitter<TSerializableObject,System.Int64> → MemorySizeSplitter<TSerializableObject>

Constructors

MemorySizeSplitter(IEnumerable<TSerializableObject>) Constructor

Initializes a new instance of the MemorySizeSplitter<TSerializableObject> class.

public MemorySizeSplitter(System.Collections.Generic.IEnumerable<TSerializableObject> serializableObjects);

Parameters

serializableObjects System.Collections.Generic.IEnumerable<TSerializableObject>

The collection of serializable objects to be split.

Methods

MemorySizeSplitter<TSerializableObject>.GetValue(TSerializableObject) Method

Gets the memory size value for the specified serializable object.

public override long GetValue(TSerializableObject? serializableObject);

Parameters

serializableObject TSerializableObject

The serializable object to get the memory size value for.

Returns

System.Int64
The memory size value of the specified serializable object.

MultiUpdater<TValue> Class

Class MultiUpdater.

public class MultiUpdater<TValue> : DiGi.Core.Interfaces.IUpdater<TValue>, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator

Type parameters

TValue

The type of value handled by the MultiUpdater.

Inheritance System.Object → MultiUpdater<TValue>

Implements DiGi.Core.Interfaces.IUpdater<TValue>, IUpdater, IEvaluator

Constructors

MultiUpdater(IEnumerable<IUpdater>) Constructor

Initializes a new instance of the MultiUpdater<TValue> class using a collection of updaters.

public MultiUpdater(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUpdater> updaters);

Parameters

updaters System.Collections.Generic.IEnumerable<IUpdater>

The collection of updaters to initialize the MultiUpdater with.

Properties

MultiUpdater<TValue>.Value Property

Gets the current value associated with the updater.

public TValue? Value { get; set; }

Implements Value

Property Value

TValue

Methods

MultiUpdater<TValue>.Update() Method

Performs an update operation and returns whether any changes were made.

public bool Update();

Implements Update()

Returns

System.Boolean
True if any changes were made; otherwise, false.

MultiUpdater<TValue>.Update(bool[]) Method

Performs an update operation and returns a boolean array indicating which specific updaters were modified.

public bool Update(out bool[]? updated);

Parameters

updated System.Boolean[]

When this method returns, contains a boolean array indicating which specific updaters were modified.

Returns

System.Boolean
True if the update operation was successful; otherwise, false.

Object Class

Base abstract class for all domain objects within DiGi.Core.

public abstract class Object : DiGi.Core.Interfaces.IObject

Inheritance System.Object → Object

Derived
SerializableObject

Implements IObject

Constructors

Object() Constructor

Initializes a new instance of the Object class.

public Object();

ObjectPath Class

Represents a hierarchical path to an object.

public class ObjectPath : DiGi.Core.Classes.ObjectPath<DiGi.Core.Classes.ObjectPath>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.ObjectPath<ObjectPath> → ObjectPath

Constructors

ObjectPath(string) Constructor

Initializes a new instance of the ObjectPath class with a single segment name.

public ObjectPath(string name);

Parameters

name System.String

The name of the path segment.

ObjectPath(string, ObjectPath) Constructor

Initializes a new instance of the ObjectPath class by appending a name to an existing path.

public ObjectPath(string name, DiGi.Core.Classes.ObjectPath path);

Parameters

name System.String

The name of the segment to append.

path ObjectPath

The existing path to which the name is appended.

ObjectPath(IEnumerable<string>) Constructor

Initializes a new instance of the ObjectPath class using a collection of segment names.

public ObjectPath(System.Collections.Generic.IEnumerable<string> names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

The collection of segment names to include in the path.

ObjectPath(JsonObject) Constructor

Initializes a new instance of the ObjectPath class from a JSON object.

public ObjectPath(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the path.

ObjectPath<TObjectPath> Class

Base class for representing a hierarchical path to an object.

public abstract class ObjectPath<TObjectPath> : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.IObjectPath<TObjectPath>, DiGi.Core.Interfaces.IObjectPath, DiGi.Core.Interfaces.IObject
    where TObjectPath : DiGi.Core.Classes.ObjectPath<TObjectPath>

Type parameters

TObjectPath

The type of the object path.

Inheritance System.ObjectObjectSerializableObject → ObjectPath<TObjectPath>

Derived
CategoryPath
ObjectPath

Implements DiGi.Core.Interfaces.IObjectPath<TObjectPath>, IObjectPath, IObject

Constructors

ObjectPath(ObjectPath<TObjectPath>) Constructor

Initializes a new instance of the ObjectPath class by copying an existing path.

public ObjectPath(DiGi.Core.Classes.ObjectPath<TObjectPath>? path);

Parameters

path DiGi.Core.Classes.ObjectPath<TObjectPath>

The existing path to copy.

ObjectPath(string) Constructor

Initializes a new instance of the ObjectPath class with a single segment name.

public ObjectPath(string? name);

Parameters

name System.String

The name of the single segment.

ObjectPath(string, TObjectPath) Constructor

Initializes a new instance of the ObjectPath class by appending a name to an existing path.

public ObjectPath(string? name, TObjectPath? path);

Parameters

name System.String

The name of the segment to append.

path TObjectPath

The existing path to which the name is appended.

ObjectPath(IEnumerable<string>) Constructor

Initializes a new instance of the ObjectPath class using a collection of segment names.

public ObjectPath(System.Collections.Generic.IEnumerable<string>? names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

The collection of segment names.

ObjectPath(JsonObject) Constructor

Initializes a new instance of the ObjectPath class from a JSON object.

public ObjectPath(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the path from.

Properties

ObjectPath<TObjectPath>.Name Property

Gets the name of the current path segment.

public string Name { get; set; }

Property Value

System.String

ObjectPath<TObjectPath>.Path Property

Gets the parent path segment.

public TObjectPath? Path { get; set; }

Property Value

TObjectPath

ObjectPath<TObjectPath>.Separator Property

Gets the character used to separate segments in the path.

public static string Separator { get; }

Property Value

System.String

Methods

ObjectPath<TObjectPath>.Add(string) Method

Appends a new segment to the path and returns the resulting path.

public TObjectPath? Add(string? name);

Parameters

name System.String

The name of the segment to append.

Returns

TObjectPath
The resulting path after appending the segment.

ObjectPath<TObjectPath>.Add(IEnumerable<string>) Method

Appends multiple segments to the path and returns the resulting path.

public TObjectPath? Add(System.Collections.Generic.IEnumerable<string>? names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

The collection of segment names to append.

Returns

TObjectPath
The resulting path after appending the segments.

ObjectPath<TObjectPath>.Equals(object) Method

Determines whether the specified object is equal to the current path.

public override bool Equals(object obj);

Parameters

obj System.Object

The object to compare with the current path.

Returns

System.Boolean
True if the objects are equal; otherwise, false.

ObjectPath<TObjectPath>.GetHashCode() Method

Returns the hash code for this path.

public override int GetHashCode();

Returns

System.Int32
The hash code for this path.

ObjectPath<TObjectPath>.GetNames(bool) Method

Retrieves a list of all segment names in the path.

public System.Collections.Generic.List<string> GetNames(bool includeName=true);

Parameters

includeName System.Boolean

A value indicating whether to include the name.

Returns

System.Collections.Generic.List<System.String>
A list of strings containing the segment names.

ObjectPath<TObjectPath>.ToString() Method

Returns a string representation of the hierarchical path.

public override string ToString();

Returns

System.String
A string representing the hierarchical path.

ProgressWrapper<T> Class

Provides thread-safe progress reporting for values of type T.

public class ProgressWrapper<T> : DiGi.Core.Interfaces.IObject

Type parameters

T

The type of the progress value.

Inheritance System.Object → ProgressWrapper<T>

Derived
LongProgressWrapper

Implements IObject

Constructors

ProgressWrapper(T, IProgress<T>) Constructor

Initializes a new instance of the ProgressWrapper<T> class with an initial value.

public ProgressWrapper(T initialValue, System.IProgress<T>? progress=null);

Parameters

initialValue T

The initial progress value.

progress System.IProgress<T>

An optional IProgress implementation to report updates to.

Properties

ProgressWrapper<T>.Current Property

Gets the current progress value.

public T Current { get; private set; }

Property Value

T

Methods

ProgressWrapper<T>.Report(T) Method

Reports a new progress value.

public void Report(T value);

Parameters

value T

The progress value to report.

PropertyReference Class

Represents a reference to a property within a serializable object.

public abstract class PropertyReference : DiGi.Core.Classes.SerializableReference

Inheritance System.ObjectObjectSerializableObjectSerializableReference → PropertyReference

Derived
PropertyReference<USerializableReference>

Constructors

PropertyReference(PropertyReference) Constructor

Initializes a new instance of the PropertyReference class by copying an existing reference.

public PropertyReference(DiGi.Core.Classes.PropertyReference? propertyReference);

Parameters

propertyReference PropertyReference

The property reference to copy.

PropertyReference(string) Constructor

Initializes a new instance of the PropertyReference class with the specified property name.

public PropertyReference(string? propertyName);

Parameters

propertyName System.String

The name of the property.

PropertyReference(JsonObject) Constructor

Initializes a new instance of the PropertyReference class from the specified nullable JSON object.

public PropertyReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the reference from.

Properties

PropertyReference.PropertyName Property

Gets or sets the name of the referenced property.

public string? PropertyName { get; }

Property Value

System.String

PropertyReference<USerializableReference> Class

Represents a typed reference to a property within a serializable object.

public abstract class PropertyReference<USerializableReference> : DiGi.Core.Classes.PropertyReference
    where USerializableReference : DiGi.Core.Classes.SerializableReference

Type parameters

USerializableReference

The type of the serializable reference.

Inheritance System.ObjectObjectSerializableObjectSerializableReferencePropertyReference → PropertyReference<USerializableReference>

Derived
TypePropertyReference
UniquePropertyReference<UUniquePropertyReference>

Constructors

PropertyReference(PropertyReference<USerializableReference>) Constructor

Initializes a new instance of the PropertyReference class by copying an existing generic reference.

public PropertyReference(DiGi.Core.Classes.PropertyReference<USerializableReference>? propertyReference);

Parameters

propertyReference DiGi.Core.Classes.PropertyReference<USerializableReference>

The generic property reference to copy.

PropertyReference(JsonObject) Constructor

Initializes a new instance of the PropertyReference class from the specified JSON object.

public PropertyReference(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

PropertyReference(USerializableReference, string) Constructor

Initializes a new instance of the PropertyReference class with the specified serializable reference and property name.

public PropertyReference(USerializableReference? reference, string? propertyName);

Parameters

reference USerializableReference

The serializable reference.

propertyName System.String

The name of the property.

Properties

PropertyReference<USerializableReference>.Reference Property

Gets or sets the serializable reference associated with this property reference.

public USerializableReference? Reference { get; }

Property Value

USerializableReference

Methods

PropertyReference<USerializableReference>.ToString() Method

Returns a string that represents the current object.

public override string? ToString();

Returns

System.String
A string representation of the current object.

Range<T> Class

Represents a closed interval between a minimum and maximum value of type T.

public class Range<T> : DiGi.Core.Classes.SerializableObject

Type parameters

T

The type of the values in the range.

Inheritance System.ObjectObjectSerializableObject → Range<T>

Derived
DateTimeRange

Constructors

Range(Range<T>) Constructor

Initializes a new instance of the Range<T> class by copying an existing range.

public Range(DiGi.Core.Classes.Range<T>? range);

Parameters

range DiGi.Core.Classes.Range<T>

The existing range to copy.

Range(IEnumerable<T>) Constructor

Initializes a new instance of the Range<T> class based on a collection of values.

public Range(System.Collections.Generic.IEnumerable<T>? values);

Parameters

values System.Collections.Generic.IEnumerable<T>

The collection of values to use for initializing the range.

Range(JsonObject) Constructor

Initializes a new instance of the Range<T> class from a JSON object.

public Range(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the range from.

Range(T, T) Constructor

Initializes a new instance of the Range<T> class with specified boundary values.

public Range(T? value_1, T? value_2);

Parameters

value_1 T

The first boundary value.

value_2 T

The second boundary value.

Properties

Range<T>.Length Property

Gets the length of the range.

public virtual T Length { get; }

Property Value

T

Range<T>.Max Property

Gets the maximum value of the range.

public T Max { get; }

Property Value

T

Range<T>.Min Property

Gets the minimum value of the range.

public T Min { get; }

Property Value

T

Methods

Range<T>.Add(Range<T>) Method

Expands the current range to include another range and returns true if the range was modified.

public bool Add(DiGi.Core.Classes.Range<T>? value);

Parameters

value DiGi.Core.Classes.Range<T>

The range to add.

Returns

System.Boolean
True if the range was modified; otherwise, false.

Range<T>.Add(T) Method

Adds a value to the range and returns true if the range was expanded.

public bool Add(T value);

Parameters

value T

The value to add.

Returns

System.Boolean
True if the range was expanded; otherwise, false.

Range<T>.Equals(object) Method

Determines whether the specified object is equal to the current range.

public override bool Equals(object? @object);

Parameters

object System.Object

The object to compare with the current range.

Returns

System.Boolean
True if the specified object is equal to the current range; otherwise, false.

Range<T>.GetHashCode() Method

Gets the hash code for the current type reference.

public override int GetHashCode();

Returns

System.Int32
A hash code for the current object.

Range<T>.In(Range<T>) Method

Determines whether another range is entirely contained within this range.

public bool In(DiGi.Core.Classes.Range<T>? range);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check for containment.

Returns

System.Boolean
True if the specified range is contained within this range; otherwise, false.

Range<T>.In(Range<T>, T) Method

Determines whether another range is contained within this range, considering a given tolerance.

public bool In(DiGi.Core.Classes.Range<T>? range, T tolerance);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check for containment.

tolerance T

The tolerance value to use during the containment check.

Returns

System.Boolean
True if the specified range is contained within this range; otherwise, false.

Range<T>.In(T) Method

Determines whether a specified value is contained within the range.

public bool In(T value);

Parameters

value T

The value to check for containment.

Returns

System.Boolean
True if the value is contained within the range; otherwise, false.

Range<T>.In(T, T) Method

Determines whether a specified value is contained within the range, considering a given tolerance.

public bool In(T value, T tolerance);

Parameters

value T

The value to check for containment.

tolerance T

The tolerance value to use during the containment check.

Returns

System.Boolean
True if the specified value is contained within the range; otherwise, false.

Range<T>.InRange(Range<T>, T) Method

Determines whether the specified range is in range (intersects or is within tolerance) of the current range.

public bool InRange(DiGi.Core.Classes.Range<T>? range, T tolerance);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check.

tolerance T

The tolerance value to consider.

Returns

System.Boolean
True if the ranges intersect or are within the specified tolerance; otherwise, false.

Range<T>.Intersect(Range<T>) Method

Determines whether the current range intersects with another specified range.

public bool Intersect(DiGi.Core.Classes.Range<T>? range);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check for intersection.

Returns

System.Boolean
True if the ranges intersect; otherwise, false.

Range<T>.Intersect(Range<T>, T) Method

Determines whether the current range intersects with another specified range, considering a given tolerance.

public bool Intersect(DiGi.Core.Classes.Range<T>? range, T tolerance);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check for intersection.

tolerance T

The tolerance value to use during the intersection check.

Returns

System.Boolean
True if the ranges intersect; otherwise, false.

Range<T>.Out(Range<T>) Method

Determines whether another range is completely outside this range.

public bool Out(DiGi.Core.Classes.Range<T>? range);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check.

Returns

System.Boolean
True if the specified range is completely outside this range; otherwise, false.

Range<T>.Out(Range<T>, T) Method

Determines whether another range is completely outside this range, considering a given tolerance.

public bool Out(DiGi.Core.Classes.Range<T>? range, T tolerance);

Parameters

range DiGi.Core.Classes.Range<T>

The range to check.

tolerance T

The tolerance value to consider.

Returns

System.Boolean
True if the specified range is completely outside this range; otherwise, false.

Range<T>.Out(T) Method

Determines whether a specified value is outside the boundaries of the range.

public bool Out(T value);

Parameters

value T

The value to check.

Returns

System.Boolean
True if the specified value is outside the boundaries of the range; otherwise, false.

Range<T>.Out(T, T) Method

Determines whether a specified value is outside the boundaries of the range, considering a given tolerance.

public bool Out(T value, T tolerance);

Parameters

value T

The value to check.

tolerance T

The tolerance value to consider.

Returns

System.Boolean
True if the specified value is outside the boundaries of the range; otherwise, false.

Range<T>.ToString() Method

Returns a string representation of the current range.

public override string ToString();

Returns

System.String
A string that represents the current range.

Operators

Range<T>.operator ==(Range<T>, object) Operator

Compares the specified Range<T> with another object for equality.

public static bool operator ==(DiGi.Core.Classes.Range<T>? range, object? @object);

Parameters

range DiGi.Core.Classes.Range<T>

The Range<T> instance to compare.

object System.Object

The object to compare with the range.

Returns

System.Boolean
true if the objects are equal; otherwise, false.

Range<T>.operator !=(Range<T>, object) Operator

Compares the specified Range<T> with another object for inequality.

public static bool operator !=(DiGi.Core.Classes.Range<T>? range, object? @object);

Parameters

range DiGi.Core.Classes.Range<T>

The Range<T> instance to compare.

object System.Object

The object to compare with the range.

Returns

System.Boolean
true if the objects are not equal; otherwise, false.

ReportableBackgroundTask<T> Class

Provides a base class for background tasks that report progress during execution.

public abstract class ReportableBackgroundTask<T> : DiGi.Core.Classes.CancelableBackgroundTask, DiGi.Core.Interfaces.IReportableBackgroundTask<T>, DiGi.Core.Interfaces.IReportableBackgroundTask, DiGi.Core.Interfaces.ICancelableBackgroundTask, DiGi.Core.Interfaces.IBackgroundTask, DiGi.Core.Interfaces.IObject

Type parameters

T

The type of progress data reported.

Inheritance System.ObjectBackgroundTaskCancelableBackgroundTask → ReportableBackgroundTask<T>

Implements DiGi.Core.Interfaces.IReportableBackgroundTask<T>, IReportableBackgroundTask, ICancelableBackgroundTask, IBackgroundTask, IObject

Methods

ReportableBackgroundTask<T>.ExecuteAsync(IProgress<T>, CancellationToken) Method

When overridden in a derived class, defines the work to be executed with progress reporting.

protected abstract System.Threading.Tasks.Task<bool> ExecuteAsync(System.IProgress<T> progress, System.Threading.CancellationToken cancellationToken);

Parameters

progress System.IProgress<T>

The progress reporter for reporting progress updates.

cancellationToken System.Threading.CancellationToken

The cancellation token to observe.

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the task succeeded; otherwise, false.

ReportableBackgroundTask<T>.ExecuteAsync(CancellationToken) Method

Executes the background task with progress reporting support.

protected override System.Threading.Tasks.Task<bool> ExecuteAsync(System.Threading.CancellationToken cancellationToken);

Parameters

cancellationToken System.Threading.CancellationToken

The cancellation token to observe.

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the task succeeded; otherwise, false.

ReportableBackgroundTask<T>.OnProgressChanged(T) Method

Raises the ProgressChanged event with the given progress value.

protected virtual void OnProgressChanged(T value);

Parameters

value T

The progress value to report.

Events

ReportableBackgroundTask<T>.ProgressChanged Event

Occurs when the task reports progress.

public event EventHandler<T>? ProgressChanged;

Implements ProgressChanged

Event Type

System.EventHandler<T>

SerializableModel Class

Base class for models that support serialization.

public abstract class SerializableModel : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ISerializableModel, DiGi.Core.Interfaces.IModel, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectObjectSerializableObject → SerializableModel

Implements ISerializableModel, IModel, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject

Constructors

SerializableModel() Constructor

Initializes a new instance of the SerializableModel class.

public SerializableModel();

SerializableModel(SerializableModel) Constructor

Initializes a new instance of the SerializableModel class by copying an existing model.

public SerializableModel(DiGi.Core.Classes.SerializableModel serializableModel);

Parameters

serializableModel SerializableModel

The source model to copy from.

SerializableModel(JsonObject) Constructor

Initializes a new instance of the SerializableModel class from a JSON object.

public SerializableModel(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the model.

SerializableObject Class

Abstract base class that provides core JSON serialization and deserialization capabilities to an Object.

public abstract class SerializableObject : DiGi.Core.Classes.Object, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectObject → SerializableObject

Derived
Address
Category
Color
ConfigurationFile
Coordinates
DateTimeCollection
DateTimeSeries
IndexedObjects<T>
ObjectPath<TObjectPath>
Range<T>
SerializableModel
SerializableObjectCollection<T>
SerializableObjectWrapper
SerializableOptions
SerializableReference
SerializableResult
Size
UniqueObject
Value<TObject>

Implements ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

SerializableObject() Constructor

Initializes a new instance of the SerializableObject class.

public SerializableObject();

SerializableObject(SerializableObject) Constructor

Initializes a new instance of the SerializableObject class by copying another serializable object.

public SerializableObject(DiGi.Core.Classes.SerializableObject? serializableObject);

Parameters

serializableObject SerializableObject

The source object to copy from.

SerializableObject(JsonObject) Constructor

Initializes a new instance of the SerializableObject class from a JsonObject.

public SerializableObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing serializable data.

Properties

SerializableObject.FullTypeName Property

Gets the full type name of the object for serialization purposes.

private string? FullTypeName { private get; }

Property Value

System.String

Methods

SerializableObject.Clone() Method

Creates a deep copy of the serializable object by serializing and deserializing it.

public virtual DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new ISerializableObject instance that is a deep copy of the current object, or null if cloning fails.

SerializableObject.FromJsonObject(JsonObject) Method

Populates the object's properties from a JsonObject.

public virtual bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data to populate the object.

Implements FromJsonObject(JsonObject)

Returns

System.Boolean
True if the object was successfully populated; otherwise, false.

SerializableObject.ToJsonObject() Method

Converts the object into a JsonObject for serialization.

public virtual System.Text.Json.Nodes.JsonObject? ToJsonObject();

Implements ToJsonObject()

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the object, or null if conversion fails.

Operators

SerializableObject.explicit operator SerializableObject(JsonObject) Operator

Explicitly converts a System.Text.Json.Nodes.JsonObject to a SerializableObject instance.

public static DiGi.Core.Classes.SerializableObject? explicit operator DiGi.Core.Classes.SerializableObject?(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject to convert from.

Returns

SerializableObject
A SerializableObject instance created from the provided System.Text.Json.Nodes.JsonObject, or null if the conversion fails or the input is null.

SerializableObject.explicit operator JsonObject(SerializableObject) Operator

Explicitly converts a SerializableObject instance to a System.Text.Json.Nodes.JsonObject.

public static System.Text.Json.Nodes.JsonObject? explicit operator System.Text.Json.Nodes.JsonObject?(DiGi.Core.Classes.SerializableObject? serializableObject);

Parameters

serializableObject SerializableObject

The SerializableObject instance to convert from.

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the provided SerializableObject, or null if the input is null.

SerializableObjectCollection Class

Non-generic version of SerializableObjectCollection for handling a collection of ISerializableObjects.

public class SerializableObjectCollection : DiGi.Core.Classes.SerializableObjectCollection<DiGi.Core.Interfaces.ISerializableObject>

Inheritance System.ObjectObjectSerializableObjectDiGi.Core.Classes.SerializableObjectCollection<ISerializableObject> → SerializableObjectCollection

Constructors

SerializableObjectCollection() Constructor

Initializes a new instance of the SerializableObjectCollection class.

public SerializableObjectCollection();

SerializableObjectCollection(SerializableObjectCollection) Constructor

Initializes a new instance of the SerializableObjectCollection class by copying another collection.

public SerializableObjectCollection(DiGi.Core.Classes.SerializableObjectCollection? serializableObjectCollection);

Parameters

serializableObjectCollection SerializableObjectCollection

The source collection to copy from.

SerializableObjectCollection(IEnumerable<ISerializableObject>) Constructor

Initializes a new instance of the SerializableObjectCollection class from an enumerable of ISerializableObject instances.

public SerializableObjectCollection(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.ISerializableObject>? serializableObjects);

Parameters

serializableObjects System.Collections.Generic.IEnumerable<ISerializableObject>

The enumerable of serializable objects to initialize the collection with.

SerializableObjectCollection(JsonObject) Constructor

Initializes a new instance of the SerializableObjectCollection class from a JSON object.

public SerializableObjectCollection(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the collection from.

Methods

SerializableObjectCollection.Clone() Method

Creates a new object that is a copy of the current instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new object that is a copy of this instance.

SerializableObjectCollection<T> Class

A serializable collection of objects implementing ISerializableObject.

public class SerializableObjectCollection<T> : DiGi.Core.Classes.SerializableObject, System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable
    where T : DiGi.Core.Interfaces.ISerializableObject

Type parameters

T

The type of elements in the collection.

Inheritance System.ObjectObjectSerializableObject → SerializableObjectCollection<T>

Derived
SerializableObjectCollection

Implements System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable

Constructors

SerializableObjectCollection() Constructor

Initializes a new instance of the SerializableObjectCollection<T> class.

public SerializableObjectCollection();

SerializableObjectCollection(SerializableObjectCollection<T>) Constructor

Initializes a new instance of the SerializableObjectCollection<T> class by copying another collection.

public SerializableObjectCollection(DiGi.Core.Classes.SerializableObjectCollection<T>? serializableObjectCollection);

Parameters

serializableObjectCollection DiGi.Core.Classes.SerializableObjectCollection<T>

The source collection to copy from.

SerializableObjectCollection(IEnumerable<T>) Constructor

Initializes a new instance of the SerializableObjectCollection<T> class from an enumerable of serializable objects.

public SerializableObjectCollection(System.Collections.Generic.IEnumerable<T>? serializableObjects);

Parameters

serializableObjects System.Collections.Generic.IEnumerable<T>

The enumerable of serializable objects to initialize the collection with.

SerializableObjectCollection(JsonObject) Constructor

Initializes a new instance of the SerializableObjectCollection<T> class from a JSON object.

public SerializableObjectCollection(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the collection from.

Properties

SerializableObjectCollection<T>.Count Property

Gets the number of elements contained in the collection.

public int Count { get; }

Implements Count

Property Value

System.Int32

SerializableObjectCollection<T>.IsReadOnly Property

Gets a value indicating whether the collection is read-only.

public bool IsReadOnly { get; }

Implements IsReadOnly

Property Value

System.Boolean

SerializableObjectCollection<T>.this[int] Property

Gets or sets the element at the specified index of the collection.

public T this[int index] { get; set; }

Parameters

index System.Int32

The zero-based index of the element to get or set.

Property Value

T

SerializableObjectCollection<T>.Values Property

Gets the list of elements contained in the collection.

public System.Collections.Generic.IList<T> Values { get; }

Property Value

System.Collections.Generic.IList<T>

Methods

SerializableObjectCollection<T>.Add(T) Method

Adds an item to the collection.

public void Add(T serializableObject);

Parameters

serializableObject T

The object to add to the collection.

Implements Add(T)

SerializableObjectCollection<T>.Clear() Method

Removes all items from the collection.

public void Clear();

Implements Clear()

SerializableObjectCollection<T>.Contains(T) Method

Determines whether the collection contains a specific value.

public bool Contains(T? item);

Parameters

item T

The object to locate in the collection.

Implements Contains(T)

Returns

System.Boolean
True if the item is found; otherwise, false.

SerializableObjectCollection<T>.CopyTo(T[], int) Method

Copies the elements of the collection to an Array, starting at a particular Array index.

public void CopyTo(T[] array, int arrayIndex);

Parameters

array T[]

The one-dimensional Array that is the destination of the elements.

arrayIndex System.Int32

The zero-based index in array at which copying begins.

Implements CopyTo(T[], int)

SerializableObjectCollection<T>.GetEnumerator() Method

Returns an enumerator that iterates through the collection.

public System.Collections.Generic.IEnumerator<T> GetEnumerator();

Implements GetEnumerator(), GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T>
An enumerator that can be used to iterate through the collection.

SerializableObjectCollection<T>.Remove(T) Method

Removes the first occurrence of a specific object from the collection.

public bool Remove(T? item);

Parameters

item T

The object to remove from the collection.

Implements Remove(T)

Returns

System.Boolean
True if item was successfully removed from the collection; otherwise, false.

SerializableObjectCollection<T>.RemoveAt(int) Method

Removes the element at the specified index of the collection.

public void RemoveAt(int index);

Parameters

index System.Int32

The zero-based index of the element to remove.

Operators

SerializableObjectCollection<T>.explicit operator SerializableObjectCollection<T>(List<T>) Operator

Explicitly converts a System.Collections.Generic.List<> to a SerializableObjectCollection<T>.

public static DiGi.Core.Classes.SerializableObjectCollection<T>? explicit operator DiGi.Core.Classes.SerializableObjectCollection<T>?(System.Collections.Generic.List<T>? serializableObjects);

Parameters

serializableObjects System.Collections.Generic.List<T>

The list of objects to convert into a collection.

Returns

DiGi.Core.Classes.SerializableObjectCollection<T>
A new instance of SerializableObjectCollection<T> containing the provided elements, or null if the input list is null.

SerializableObjectCollection<T>.explicit operator SerializableObjectCollection<T>(T[]) Operator

Explicitly converts an array of type T to a SerializableObjectCollection<T>.

public static DiGi.Core.Classes.SerializableObjectCollection<T>? explicit operator DiGi.Core.Classes.SerializableObjectCollection<T>?(T[]? serializableObjects);

Parameters

serializableObjects T[]

The array of objects to convert into a collection.

Returns

DiGi.Core.Classes.SerializableObjectCollection<T>
A new instance of SerializableObjectCollection<T> containing the provided elements, or null if the input array is null.

SerializableObjectCollection<T>.explicit operator List<T>(SerializableObjectCollection<T>) Operator

Explicitly converts a SerializableObjectCollection<T> to a System.Collections.Generic.List<>.

public static System.Collections.Generic.List<T>? explicit operator System.Collections.Generic.List<T>?(DiGi.Core.Classes.SerializableObjectCollection<T>? serializableObjectCollection);

Parameters

serializableObjectCollection DiGi.Core.Classes.SerializableObjectCollection<T>

The serializable object collection to convert into a list.

Returns

System.Collections.Generic.List<T>
A new instance of System.Collections.Generic.List<> containing the elements from the source collection, or null if the input collection is null.

SerializableObjectCollection<T>.explicit operator T[](SerializableObjectCollection<T>) Operator

Explicitly converts the SerializableObjectCollection<T> to an array of type T.

public static T[]? explicit operator T[]?(DiGi.Core.Classes.SerializableObjectCollection<T>? serializableObjectCollection);

Parameters

serializableObjectCollection DiGi.Core.Classes.SerializableObjectCollection<T>

The collection instance to convert.

Returns

T[]
An array containing the elements of the collection, or null if the provided collection is null.

Explicit Interface Implementations

System.Collections.IEnumerable.GetEnumerator() Method

Returns an enumerator that iterates through a collection.

System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();

Implements GetEnumerator()

SerializableObjectListCluster<TKey_1,TKey_2,TValue> Class

Base class for clusters of serializable objects keyed by two keys.

public abstract class SerializableObjectListCluster<TKey_1,TKey_2,TValue> : DiGi.Core.Classes.List<TKey_1, TKey_2, TValue>, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
    where TValue : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TKey_1

The type of the first key.

TKey_2

The type of the second key.

TValue

The type of the values in the cluster.

Inheritance System.ObjectDiGi.Core.Classes.Cluster<TKey_1,TKey_2,TValue>DiGi.Core.Classes.List<TKey_1,TKey_2,TValue> → SerializableObjectListCluster<TKey_1,TKey_2,TValue>

Implements ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

SerializableObjectListCluster() Constructor

Initializes a new instance of the SerializableObjectListCluster class.

public SerializableObjectListCluster();

SerializableObjectListCluster(SerializableObjectListCluster<TKey_1,TKey_2,TValue>) Constructor

Initializes a new instance of the SerializableObjectListCluster class from another serializable list cluster.

public SerializableObjectListCluster(DiGi.Core.Classes.SerializableObjectListCluster<TKey_1,TKey_2,TValue>? serializableObjectListCluster);

Parameters

serializableObjectListCluster DiGi.Core.Classes.SerializableObjectListCluster<TKey_1,TKey_2,TValue>

The source serializable list cluster to copy from.

SerializableObjectListCluster(IEnumerable<TValue>) Constructor

Initializes a new instance of the SerializableObjectListCluster class using the specified collection of values.

public SerializableObjectListCluster(System.Collections.Generic.IEnumerable<TValue>? values);

Parameters

values System.Collections.Generic.IEnumerable<TValue>

The collection of values to initialize the cluster with.

SerializableObjectListCluster(JsonObject) Constructor

Initializes a new instance of the SerializableObjectListCluster class from a JSON object.

public SerializableObjectListCluster(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the cluster from.

Methods

SerializableObjectListCluster<TKey_1,TKey_2,TValue>.Clone() Method

Creates a deep copy of the current serializable value cluster.

public virtual DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new ISerializableObject that is a clone of the current instance, or null.

SerializableObjectListCluster<TKey_1,TKey_2,TValue>.FromJsonObject(JsonObject) Method

Populates the current instance from the specified JSON object.

public bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to populate the instance from.

Implements FromJsonObject(JsonObject)

Returns

System.Boolean
True if the population was successful; otherwise, false.

SerializableObjectListCluster<TKey_1,TKey_2,TValue>.ToJsonObject() Method

Converts the current instance into a JSON object.

public System.Text.Json.Nodes.JsonObject? ToJsonObject();

Implements ToJsonObject()

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the current instance, or null.

SerializableObjectValueCluster<TKey_1,TKey_2,TValue> Class

Represents a base abstract serializable value cluster.

public abstract class SerializableObjectValueCluster<TKey_1,TKey_2,TValue> : DiGi.Core.Classes.ValueCluster<TKey_1, TKey_2, TValue>, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
    where TValue : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TKey_1

The type of the first key.

TKey_2

The type of the second key.

TValue

The type of the value.

Inheritance System.ObjectDiGi.Core.Classes.Cluster<TKey_1,TKey_2,TValue>DiGi.Core.Classes.ValueCluster<TKey_1,TKey_2,TValue> → SerializableObjectValueCluster<TKey_1,TKey_2,TValue>

Derived
UniqueObjectValueCluster<TValue>

Implements ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject

Constructors

SerializableObjectValueCluster() Constructor

Initializes a new instance of the SerializableObjectValueCluster class.

public SerializableObjectValueCluster();

SerializableObjectValueCluster(SerializableObjectValueCluster<TKey_1,TKey_2,TValue>) Constructor

Initializes a new instance of the SerializableObjectValueCluster class from another serializable value cluster.

public SerializableObjectValueCluster(DiGi.Core.Classes.SerializableObjectValueCluster<TKey_1,TKey_2,TValue>? serializableObjectValueCluster);

Parameters

serializableObjectValueCluster DiGi.Core.Classes.SerializableObjectValueCluster<TKey_1,TKey_2,TValue>

The serializable value cluster to copy from.

SerializableObjectValueCluster(IEnumerable<TValue>) Constructor

Initializes a new instance of the SerializableObjectValueCluster class using the specified collection of values.

public SerializableObjectValueCluster(System.Collections.Generic.IEnumerable<TValue>? values);

Parameters

values System.Collections.Generic.IEnumerable<TValue>

The collection of values to initialize the cluster with.

SerializableObjectValueCluster(JsonObject) Constructor

Initializes a new instance of the SerializableObjectValueCluster class from a JSON object.

public SerializableObjectValueCluster(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the current instance.

Methods

SerializableObjectValueCluster<TKey_1,TKey_2,TValue>.Clone() Method

Creates a deep copy of the current serializable value cluster.

public virtual DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new ISerializableObject that is a deep copy of the current instance, or null.

SerializableObjectValueCluster<TKey_1,TKey_2,TValue>.FromJsonObject(JsonObject) Method

Populates the current instance from the specified JSON object.

public bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to populate the instance from.

Implements FromJsonObject(JsonObject)

Returns

System.Boolean
True if the population was successful; otherwise, false.

SerializableObjectValueCluster<TKey_1,TKey_2,TValue>.ToJsonObject() Method

Converts the current instance into a JSON object.

public System.Text.Json.Nodes.JsonObject? ToJsonObject();

Implements ToJsonObject()

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the current instance, or null.

SerializableObjectWrapper Class

A wrapper that encapsulates a JsonObject, allowing it to be treated as a SerializableObject without full deserialization.

public class SerializableObjectWrapper : DiGi.Core.Classes.SerializableObject

Inheritance System.ObjectObjectSerializableObject → SerializableObjectWrapper

Constructors

SerializableObjectWrapper() Constructor

Initializes a new instance of the SerializableObjectWrapper class.

public SerializableObjectWrapper();

SerializableObjectWrapper(SerializableObjectWrapper) Constructor

Initializes a new instance of the SerializableObjectWrapper class by copying another instance.

public SerializableObjectWrapper(DiGi.Core.Classes.SerializableObjectWrapper? serializableObjectWrapper);

Parameters

serializableObjectWrapper SerializableObjectWrapper

The source wrapper to copy from.

SerializableObjectWrapper(JsonObject) Constructor

Initializes a new instance of the SerializableObjectWrapper class from a JSON object.

public SerializableObjectWrapper(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to wrap.

Methods

SerializableObjectWrapper.Clone() Method

Creates a new object that is a copy of the current instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

ISerializableObject
A new object that is a copy of this instance.

SerializableObjectWrapper.FromJsonObject(JsonObject) Method

Populates the object's properties from the specified JsonObject.

public override bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JsonObject to populate from.

Implements FromJsonObject(JsonObject)

Returns

System.Boolean
True if the operation was successful; otherwise, false.

SerializableObjectWrapper.ToJsonObject() Method

Converts the current instance into a JsonObject.

public override System.Text.Json.Nodes.JsonObject? ToJsonObject();

Implements ToJsonObject()

Returns

System.Text.Json.Nodes.JsonObject
A JsonObject representation of the instance.

SerializableObjectWrapper.TryGetFullTypeName(string) Method

Attempts to retrieve the full type name from the wrapped JsonObject.

public bool TryGetFullTypeName(out string? fullTypeName);

Parameters

fullTypeName System.String

When this method returns, contains the full type name if successful; otherwise, null.

Returns

System.Boolean
True if the full type name was successfully retrieved; otherwise, false.

Operators

SerializableObjectWrapper.explicit operator SerializableObjectWrapper(JsonObject) Operator

Explicitly converts a System.Text.Json.Nodes.JsonObject to a SerializableObjectWrapper.

public static DiGi.Core.Classes.SerializableObjectWrapper? explicit operator DiGi.Core.Classes.SerializableObjectWrapper?(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject to convert.

Returns

SerializableObjectWrapper
A new SerializableObjectWrapper instance wrapping the provided System.Text.Json.Nodes.JsonObject.

SerializableObjectWrapper.explicit operator JsonObject(SerializableObjectWrapper) Operator

Explicitly converts a SerializableObjectWrapper to a System.Text.Json.Nodes.JsonObject.

public static System.Text.Json.Nodes.JsonObject? explicit operator System.Text.Json.Nodes.JsonObject?(DiGi.Core.Classes.SerializableObjectWrapper? serializableObjectWrapper);

Parameters

serializableObjectWrapper SerializableObjectWrapper

The SerializableObjectWrapper instance to convert.

Returns

System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the wrapper, or null if the wrapper is null.

SerializableOptions Class

Abstract base class for serializable configuration or option objects.

public abstract class SerializableOptions : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ISerializableOptions, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.IOptions

Inheritance System.ObjectObjectSerializableObject → SerializableOptions

Derived
ConvertOptions

Implements ISerializableOptions, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject, IOptions

Constructors

SerializableOptions() Constructor

Initializes a new instance of the SerializableOptions class.

public SerializableOptions();

SerializableOptions(SerializableOptions) Constructor

Initializes a new instance of the SerializableOptions class by copying another options instance.

public SerializableOptions(DiGi.Core.Classes.SerializableOptions? serializableOptions);

Parameters

serializableOptions SerializableOptions

The source options instance to copy from.

SerializableOptions(JsonObject) Constructor

Initializes a new instance of the SerializableOptions class from a JSON object.

public SerializableOptions(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize options from.

SerializableReference Class

Base class for serializable references with equality comparison based on hash codes.

public abstract class SerializableReference : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ISerializableReference, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.IReference, System.IEquatable<DiGi.Core.Interfaces.IReference>

Inheritance System.ObjectObjectSerializableObject → SerializableReference

Derived
ExternalReference
PropertyReference
TypeReference
UniqueReference

Implements ISerializableReference, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject, IObject, IReference, System.IEquatable<IReference>

Constructors

SerializableReference() Constructor

Initializes a new instance of the SerializableReference class.

public SerializableReference();

SerializableReference(SerializableReference) Constructor

Initializes a new instance of the SerializableReference class by copying an existing reference.

public SerializableReference(DiGi.Core.Classes.SerializableReference? serializableReference);

Parameters

serializableReference SerializableReference

The existing reference to copy.

SerializableReference(JsonObject) Constructor

Initializes a new instance of the SerializableReference class from a JSON object.

public SerializableReference(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the reference from.

Methods

SerializableReference.Equals(IReference) Method

Determines whether the specified reference is equal to the current serializable reference.

public bool Equals(DiGi.Core.Interfaces.IReference reference);

Parameters

reference IReference

The reference to compare with the current serializable reference.

Returns

System.Boolean
True if the specified reference is equal to the current serializable reference; otherwise, false.

SerializableReference.Equals(object) Method

Determines whether the specified object is equal to the current serializable reference.

public override bool Equals(object @object);

Parameters

object System.Object

The object to compare with the current serializable reference.

Returns

System.Boolean
True if the specified object is equal to the current serializable reference; otherwise, false.

SerializableReference.GetHashCode() Method

Gets the hash code for the current type reference.

public override int GetHashCode();

Returns

System.Int32
The hash code for the current type reference.

Operators

SerializableReference.operator ==(SerializableReference, SerializableReference) Operator

Compares two SerializableReference instances for equality.

public static bool operator ==(DiGi.Core.Classes.SerializableReference serializableReference_1, DiGi.Core.Classes.SerializableReference serializableReference_2);

Parameters

serializableReference_1 SerializableReference

The first serializable reference to compare.

serializableReference_2 SerializableReference

The second serializable reference to compare.

Returns

System.Boolean
True if the two serializable references are equal; otherwise, false.

SerializableReference.operator ==(SerializableReference, ISerializableReference) Operator

Compares a SerializableReference instance and an ISerializableReference object for equality.

public static bool operator ==(DiGi.Core.Classes.SerializableReference serializableReference_1, DiGi.Core.Interfaces.ISerializableReference @object);

Parameters

serializableReference_1 SerializableReference

The serializable reference to compare.

object ISerializableReference

The serializable reference object to compare with the first instance.

Returns

System.Boolean
True if the serializable reference and the object are equal; otherwise, false.

SerializableReference.operator ==(SerializableReference, object) Operator

Compares a SerializableReference instance and an object for equality.

public static bool operator ==(DiGi.Core.Classes.SerializableReference serializableReference_1, object @object);

Parameters

serializableReference_1 SerializableReference

The serializable reference to compare.

object System.Object

The object to compare with the serializable reference.

Returns

System.Boolean
True if the serializable reference and the object are equal; otherwise, false.

SerializableReference.operator ==(object, SerializableReference) Operator

Compares an object and a SerializableReference instance for equality.

public static bool operator ==(object serializableReference_1, DiGi.Core.Classes.SerializableReference serializableReference_2);

Parameters

serializableReference_1 System.Object

The object to compare with the serializable reference.

serializableReference_2 SerializableReference

The serializable reference to compare with the object.

Returns

System.Boolean
True if the object and the serializable reference are equal; otherwise, false.

SerializableReference.operator !=(SerializableReference, SerializableReference) Operator

Compares two SerializableReference instances for inequality.

public static bool operator !=(DiGi.Core.Classes.SerializableReference serializableReference_1, DiGi.Core.Classes.SerializableReference serializableReference_2);

Parameters

serializableReference_1 SerializableReference

The first serializable reference to compare.

serializableReference_2 SerializableReference

The second serializable reference to compare.

Returns

System.Boolean
True if the two serializable references are not equal; otherwise, false.

SerializableReference.operator !=(SerializableReference, ISerializableReference) Operator

Compares a SerializableReference instance and an ISerializableReference for inequality.

public static bool operator !=(DiGi.Core.Classes.SerializableReference serializableReference_1, DiGi.Core.Interfaces.ISerializableReference @object);

Parameters

serializableReference_1 SerializableReference

The serializable reference to compare.

object ISerializableReference

The object implementing ISerializableReference to compare with the serializable reference.

Returns

System.Boolean
True if the serializable reference and the object are not equal; otherwise, false.

SerializableReference.operator !=(SerializableReference, object) Operator

Compares a SerializableReference instance and an object for inequality.

public static bool operator !=(DiGi.Core.Classes.SerializableReference serializableReference_1, object @object);

Parameters

serializableReference_1 SerializableReference

The serializable reference to compare.

object System.Object

The object to compare with the serializable reference.

Returns

System.Boolean
True if the serializable reference and the object are not equal; otherwise, false.

SerializableReference.operator !=(object, SerializableReference) Operator

Compares an object and a SerializableReference instance for inequality.

public static bool operator !=(object serializableReference_1, DiGi.Core.Classes.SerializableReference serializableReference_2);

Parameters

serializableReference_1 System.Object

The object to compare.

serializableReference_2 SerializableReference

The serializable reference to compare with the object.

Returns

System.Boolean
True if the object and the serializable reference are not equal; otherwise, false.

SerializableResult Class

Represents a result that can be serialized.

public abstract class SerializableResult : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectObjectSerializableObject → SerializableResult

Derived
SerializableResult<T>

Implements ISerializableResult, IResult, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject

Constructors

SerializableResult() Constructor

Initializes a new instance of the SerializableResult class.

public SerializableResult();

SerializableResult(SerializableResult) Constructor

Initializes a new instance of the SerializableResult class from another serializable result.

public SerializableResult(DiGi.Core.Classes.SerializableResult? serializableResult);

Parameters

serializableResult SerializableResult

The serializable result to initialize from.

SerializableResult(JsonObject) Constructor

Initializes a new instance of the SerializableResult class from the specified JSON object.

public SerializableResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

SerializableResult<T> Class

Represents a result that can be serialized.

public abstract class SerializableResult<T> : DiGi.Core.Classes.SerializableResult, DiGi.Core.Interfaces.ISerializableResult<T>, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject
    where T : DiGi.Core.Interfaces.ISerializableObject

Type parameters

T

The type of the result.

Inheritance System.ObjectObjectSerializableObjectSerializableResult → SerializableResult<T>

Implements DiGi.Core.Interfaces.ISerializableResult<T>, ISerializableResult, IResult, IObject, ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<ISerializableObject>, ICloneableObject

Constructors

SerializableResult() Constructor

Initializes a new instance of the SerializableResult class.

public SerializableResult();

SerializableResult(SerializableResult<T>) Constructor

Initializes a new instance of the SerializableResult class from a generic serializable result.

public SerializableResult(DiGi.Core.Classes.SerializableResult<T>? serializableResult);

Parameters

<a name='DiGi.Core.

Clone this wiki locally