-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Tas.Core.Classes
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.IDisposableT
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
Initializes a new instance of the Document<T> class with default settings.
public Document();Initializes a new instance of the Document<T> class using the specified path and read-only status.
public Document(string? path, bool readOnly);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.
Gets a value indicating whether the document is read-only.
public bool ReadOnly { get; }Gets the underlying value of the document.
public virtual T? Value { get; }Closes the document and releases associated resources.
public abstract void Close();Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose();Implements Dispose()
Saves the current state of the document to its source.
public abstract bool Save();System.Boolean
True if the save operation was successful; otherwise, false.
Implicitly converts a Document<T> instance to its underlying value.
public static T? implicit operator T?(DiGi.Tas.Core.Classes.Document<T>? document);document DiGi.Tas.Core.Classes.Document<T>
The document instance to convert.
T
The value of the document, or the default value of type T if the document is null.
Represents a path to a folder within the object hierarchy.
public class FolderPath : DiGi.Core.Classes.ObjectPath<DiGi.Tas.Core.Classes.FolderPath>Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.ObjectPath<FolderPath> → FolderPath
Initializes a new instance of the FolderPath class with a single segment name.
public FolderPath(string name);name System.String
The name of the path segment.
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);name System.String
The name of the segment to append.
folderPath FolderPath
The existing folder path to which the name is appended.
Initializes a new instance of the FolderPath class using a collection of segment names.
public FolderPath(System.Collections.Generic.IEnumerable<string> names);names System.Collections.Generic.IEnumerable<System.String>
The collection of segment names to include in the path.
Initializes a new instance of the FolderPath class from a JSON object.
public FolderPath(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object used to initialize the path.
Creates a new instance of the FolderPath class.
protected override DiGi.Tas.Core.Classes.FolderPath Create(string name);name System.String
The name of the segment.
FolderPath
A new instance of FolderPath.