RaftRepository2 Class

Provides the implementation for the underlying storage mechanism of a raft.

Inheritance Hierarchy

Syntax

public class RaftRepository2 : System.IDisposable

Constructors

Name Description
RaftRepository2

Initializes a new instance of the RaftRepository2 class.

Properties

Name Description
DefaultName

Gets the name of the default raft.

IsReadOnly

Gets a value indicating whether the items in the raft are read only.

MaxItemSize

Gets or sets the maximum size in bytes of an individual raft item.

RaftId

Gets or sets the product-specific identifier for the raft.

RaftName

Gets or sets the product-specific name for the raft.

SupportsVersioning

Gets a value indicating whether items are versioned by this raft.

WarnItemSize

Gets or sets the minimum size that generates a warning when saving a raft item.

Methods

Name Description
Commit(Inedo.Extensibility.UserDirectories.IUserDirectoryUser user)

Closes any external connections and commits any changes made that were not immediately saved.

CommitAsync(Inedo.Extensibility.UserDirectories.IUserDirectoryUser user)

Closes any external connections and commits any changes made that were not immediately saved.

DeleteRaftItem(RaftItemType type, string name)

Deletes a raft item.

DeleteRaftItemAsync(RaftItemType type, string name)

Deletes a raft item.

DeleteVariable(Inedo.ExecutionEngine.RuntimeVariableName name)

Deletes the specified variable if it exists.

DeleteVariableAsync(Inedo.ExecutionEngine.RuntimeVariableName name)

Deletes the specified variable if it exists.

Dispose

Releases resources used by the raft repository.

Dispose(bool disposing)

Releases resources used by the raft repository.

EnsureRelativePath(string path)

Throws an exception if the specified path is not a relative path, or if the path contains . or .. path elements.

GetDescription

Gets a description of the raft's configuration.

GetProjects(bool recursive)

Returns a sequence of all project rafts in the raft.

GetProjectsAsync(bool recursive)

Returns a sequence of all project rafts in the raft.

GetProjectScopedRaftRepository(string project)

Returns a Inedo.Extensibility.RaftRepositories.RaftRepository which is scoped to the specified project path.

GetProjectScopedRaftRepositoryAsync(string project)

Returns a Inedo.Extensibility.RaftRepositories.RaftRepository which is scoped to the specified project path.

GetRaftItem(RaftItemType type, string name)

Returns the specified item in a raft.

GetRaftItem(RaftItemType type, string name, string version)

Returns the specified item in a raft.

GetRaftItemAsync(RaftItemType type, string name)

Returns the specified item in a raft.

GetRaftItemAsync(RaftItemType type, string name, string version)

Returns the specified item in a raft.

GetRaftItems

Returns all of the items contained in the raft.

GetRaftItems(RaftItemType type)

Returns all of the items of the specified type contained in the raft.

GetRaftItemsAsync

Returns all of the items contained in the raft.

GetRaftItemsAsync(RaftItemType type)

Returns all of the items of the specified type contained in the raft.

GetRaftItemVersions(RaftItemType type, string name)

Returns a sequence of versions for the specified raft item in order starting with the most recent.

GetRaftItemVersionsAsync(RaftItemType type, string name)

Returns a sequence of versions for the specified raft item in order starting with the most recent.

GetVariables

Returns a dictionary containing all of the variables and their values in the raft.

GetVariablesAsync

Returns a dictionary containing all of the variables and their values in the raft.

SaveToZipAsync(System.IO.Stream stream)

Saves a copy of the raft to the specified System.IO.Stream in zip format.

SetVariable(Inedo.ExecutionEngine.RuntimeVariableName name, string value)

Sets the value of the specified variable.

SetVariableAsync(Inedo.ExecutionEngine.RuntimeVariableName name, string value)

Sets the value of the specified variable.

TestConfiguration

Validates the configuration of the raft based on its property values.

TestConfigurationAsync

Validates the configuration of the raft based on its property values.

WriteRaftItem(RaftItemType type, string name, byte[] content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteRaftItem(RaftItemType type, string name, System.IO.Stream content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteRaftItem(RaftItemType type, string name, string content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteRaftItemAsync(RaftItemType type, string name, byte[] content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteRaftItemAsync(RaftItemType type, string name, System.IO.Stream content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteRaftItemAsync(RaftItemType type, string name, string content, System.DateTimeOffset? timestamp, string userName)

Creates or updates the raft item with the specified type, name, and content. If the item already exists, it is overwritten.

WriteStandardVariableData(System.Collections.Generic.IReadOnlyDictionary<Inedo.ExecutionEngine.RuntimeVariableName, string> variables, System.IO.TextWriter textWriter)

Writes a dictionary of variasbles values to the specified System.IO.TextWriter.

Remarks

Conceptually, rafts have a simple folder structure with raft item type being the top level folder, each containing individual items as files. Project-specific content is represented as nested rafts beneath the top-level "projects" folder.