Skip to content

DiGi.Tas.Core.Classes

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

DiGi.Tas.Core.Classes Namespace

Classes

Document<T> Class

Provides a base abstract class for document handling with support for loading, saving, and disposal of resources.

public abstract class Document<T> : DiGi.Tas.Core.Interfaces.IDocument, DiGi.Tas.Core.Interfaces.ITasObject, DiGi.Core.Interfaces.IObject, System.IDisposable

Type parameters

T

The type of the value contained within the document.

Inheritance System.Object → Document<T>

Implements DiGi.Tas.Core.Interfaces.IDocument, DiGi.Tas.Core.Interfaces.ITasObject, DiGi.Core.Interfaces.IObject, System.IDisposable

Constructors

Document() Constructor

Initializes a new instance of the Document<T> class with default settings.

public Document();

Document(string, bool) Constructor

Initializes a new instance of the Document<T> class using the specified path and read-only status.

public Document(string? path, bool readOnly);

Parameters

path System.String

The file path to load the document from. Can be null.

readOnly System.Boolean

A value indicating whether the document is opened in read-only mode.

Properties

Document<T>.ReadOnly Property

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

public bool ReadOnly { get; }

Property Value

System.Boolean

Document<T>.Value Property

Gets the underlying value of the document.

public virtual T? Value { get; }

Property Value

T

Methods

Document<T>.Close() Method

Closes the document and releases associated resources.

public abstract void Close();

Document<T>.Dispose() Method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose();

Implements Dispose()

Document<T>.Save() Method

Saves the current state of the document to its source.

public abstract bool Save();

Returns

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

Operators

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

Implicitly converts a Document<T> instance to its underlying value.

public static T? implicit operator T?(DiGi.Tas.Core.Classes.Document<T>? document);

Parameters

document DiGi.Tas.Core.Classes.Document<T>

The document instance to convert.

Returns

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

FolderPath Class

Represents a path to a folder within the object hierarchy.

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

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectDiGi.Core.Classes.ObjectPath<FolderPath> → FolderPath

Constructors

FolderPath(string) Constructor

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

public FolderPath(string name);

Parameters

name System.String

The name of the path segment.

FolderPath(string, FolderPath) Constructor

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

public FolderPath(string name, DiGi.Tas.Core.Classes.FolderPath folderPath);

Parameters

name System.String

The name of the segment to append.

folderPath FolderPath

The existing folder path to which the name is appended.

FolderPath(IEnumerable<string>) Constructor

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

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

Parameters

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

The collection of segment names to include in the path.

FolderPath(JsonObject) Constructor

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

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

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the path.

Methods

FolderPath.Create(string) Method

Creates a new instance of the FolderPath class.

protected override DiGi.Tas.Core.Classes.FolderPath Create(string name);

Parameters

name System.String

The name of the segment.

Returns

FolderPath
A new instance of FolderPath.

Clone this wiki locally