Table of Contents

Class ChainOperationContextFeats

Namespace
Gve.Text
Assembly
Gve.Text.dll

Features for a chain operation context or step.

public class ChainOperationContextFeats
Inheritance
ChainOperationContextFeats
Derived
Inherited Members

Constructors

ChainOperationContextFeats()

Initializes a new instance of the ChainOperationContextFeats class.

public ChainOperationContextFeats()

ChainOperationContextFeats(ChainOperationContextFeats)

Initializes a new instance of the ChainOperationContextFeats class from another one.

public ChainOperationContextFeats(ChainOperationContextFeats feats)

Parameters

feats ChainOperationContextFeats

The source feats.

Properties

Features

Gets the features.

public List<OperationFeature> Features { get; }

Property Value

List<OperationFeature>

NodeFeatures

Gets the node features dictionary, where the key is a tuple of the version tag and the node ID, and the value is a list of features.

public Dictionary<string, List<OperationFeature>> NodeFeatures { get; }

Property Value

Dictionary<string, List<OperationFeature>>

Methods

CopyTaggedNodeFeatures(string, string, bool)

Copies the features from a tagged set to another.

public void CopyTaggedNodeFeatures(string sourceTag, string targetTag, bool includeShortLived = false)

Parameters

sourceTag string

The source tag.

targetTag string

The target tag.

includeShortLived bool

True to include in the copy also the short-lived features in source.

Exceptions

ArgumentNullException

sourceTag or targetTag

GetNodeFeatures(int, IList<string>)

Gets the features for the node with the specified ID by collecting them from the features of all the specified tags, in that order.

public IList<Feature> GetNodeFeatures(int id, IList<string> tags)

Parameters

id int

The node identifier.

tags IList<string>

The version tags to collect features from.

Returns

IList<Feature>

Features.

Exceptions

ArgumentNullException

UpdateFeatures<T>(IList<OperationFeature>, string?, IList<ChainNode<T>>?)

Updates the features of this context and/or of the nodes from the specified source features.

public void UpdateFeatures<T>(IList<OperationFeature> sources, string? tag = null, IList<ChainNode<T>>? nodes = null)

Parameters

sources IList<OperationFeature>

The source features.

tag string

The tag the features belong to.

nodes IList<ChainNode<T>>

The nodes targeted in the update when any source features targets nodes instead of context.

Type Parameters

T

The data type of nodes.

Exceptions

ArgumentNullException

sources