Table of Contents

Class RDCoreFile

Namespace
RDCore.SDK.Workspace
Assembly
RDCore.SDK.Protocol.dll

A file of a project that is not a module: a README.md, a licence, a picture (OtherFiles).

[JsonConverter(typeof(RDCoreFileJsonConverter))]
public record RDCoreFile : IEquatable<RDCoreFile>
Inheritance
RDCoreFile
Implements
Derived
Inherited Members

Remarks

A project file writes it as its path alone, "README.md", so that a .rdproj reads as the list of its files (RDCoreFileJsonConverter); an object with a RelativeUri is read the same, and is written as an object when it has members this model does not know (ExtensionData).

Properties

DefaultName

The name of a module in this file whose source declares none (FromFileName(string)).

[JsonIgnore]
public string DefaultName { get; }

Property Value

string

Extension

The file's extension with its leading period, ".md" for "docs/README.md"; an empty string when the file's name has none.

[JsonIgnore]
public string Extension { get; }

Property Value

string

ExtensionData

The members of the file's entry this model does not know, as they were read, which are written back (ExtensionData).

[JsonIgnore]
public IReadOnlyDictionary<string, JsonElement>? ExtensionData { get; init; }

Property Value

IReadOnlyDictionary<string, JsonElement>

RelativeUri

The file's path, relative to the workspace root, which identifies the file.

public string RelativeUri { get; init; }

Property Value

string

Methods

Equals(RDCoreFile?)

Whether other is the file at the same path.

public virtual bool Equals(RDCoreFile? other)

Parameters

other RDCoreFile

The file to compare with.

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.