BaseCodeReference

Ecng.Compilation

Provides a base implementation for a code reference with persistence support.

実装: ICodeReference, IPersistable

コンストラクター

BaseCodeReference
protected BaseCodeReference(IFileSystem fileSystem)
baseCodeReference = BaseCodeReference(fileSystem)

Provides a base implementation for a code reference with persistence support.

fileSystem
File system abstraction to use.

プロパティ

FileSystem
public IFileSystem FileSystem { get; }
value = baseCodeReference.FileSystem

File system abstraction available to derived classes.

Id
public virtual string Id { get; }
value = baseCodeReference.Id

Gets the identifier of the code reference. Defaults to the location.

IsValid
public abstract bool IsValid { get; }
value = baseCodeReference.IsValid

Gets a value indicating whether the code reference is valid.

Location
public abstract string Location { get; }
value = baseCodeReference.Location

Gets the location of the code reference.

Name
public abstract string Name { get; }
value = baseCodeReference.Name

Gets the name of the code reference.

メソッド

GetImages
public abstract ValueTask<IEnumerable<ValueTuple<string, byte[]>>> GetImages(CancellationToken cancellationToken)
result = baseCodeReference.GetImages(cancellationToken)

Asynchronously retrieves the images associated with the code reference.

cancellationToken
The token to monitor for cancellation requests.

戻り値: A task that represents the asynchronous operation. The task result contains an enumerable of tuples with image name and image body.

Load
public abstract void Load(SettingsStorage storage)
baseCodeReference.Load(storage)

Loads the settings from the specified storage.

storage
The storage containing the settings.
Save
public abstract void Save(SettingsStorage storage)
baseCodeReference.Save(storage)

Saves the settings to the specified storage.

storage
The storage where the settings will be saved.
ToString
public override string ToString()
result = baseCodeReference.ToString()

Returns a string that represents the current code reference.

戻り値: The location of the code reference.