SimpleVersion
Search Results for

    Show / Hide Table of Contents

    Interface ITokenRule<T>

    Contract for a rule which applies for a specific token.

    Namespace: SimpleVersion.Rules
    Assembly: SimpleVersion.Abstractions.dll
    Syntax
    public interface ITokenRule<T>
    Type Parameters
    Name Description
    T

    The type affected by the rule.

    Properties

    | Improve this Doc View Source

    Token

    Gets the token string.

    Declaration
    string Token { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Apply(IVersionContext, IEnumerable<T>)

    Returns an enumerable of T where the rule token may have been applied of the token rule requires it.

    Declaration
    IEnumerable<T> Apply(IVersionContext context, IEnumerable<T> value)
    Parameters
    Type Name Description
    IVersionContext context

    The context of the current calculation.

    System.Collections.Generic.IEnumerable<T> value

    An enumerable of T values to possible update.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    An enumerable of T where inclusion of the token may have been applied.

    | Improve this Doc View Source

    Resolve(IVersionContext, T)

    Resolve the T value using the given context. The result will have any application of the token replaced.

    Declaration
    T Resolve(IVersionContext context, T value)
    Parameters
    Type Name Description
    IVersionContext context

    The context of the current calculation.

    T value

    The T value to resolve the token against.

    Returns
    Type Description
    T

    An instance of T with the tokens replaced.

    Extension Methods

    TokenRuleExtensions.ResolveTokenRules<T>(T, IVersionContext, IEnumerable<ITokenRule<T>>)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX