BaseCodeReference
Provides a base implementation for a code reference with persistence support.
Implementa: ICodeReference, IPersistable
Construtores
protected BaseCodeReference(IFileSystem fileSystem)
baseCodeReference = BaseCodeReference(fileSystem)
Provides a base implementation for a code reference with persistence support.
- fileSystem
- File system abstraction to use.
Propriedades
public IFileSystem FileSystem { get; }
value = baseCodeReference.FileSystem
File system abstraction available to derived classes.
public virtual string Id { get; }
value = baseCodeReference.Id
Gets the identifier of the code reference. Defaults to the location.
public abstract bool IsValid { get; }
value = baseCodeReference.IsValid
Gets a value indicating whether the code reference is valid.
public abstract string Location { get; }
value = baseCodeReference.Location
Gets the location of the code reference.
public abstract string Name { get; }
value = baseCodeReference.Name
Gets the name of the code reference.
Métodos
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.
Retorna: A task that represents the asynchronous operation. The task result contains an enumerable of tuples with image name and image body.
public abstract void Load(SettingsStorage storage)
baseCodeReference.Load(storage)
Loads the settings from the specified storage.
- storage
- The storage containing the settings.
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.
public override string ToString()
result = baseCodeReference.ToString()
Returns a string that represents the current code reference.
Retorna: The location of the code reference.