SimpleVersion
Search Results for

    Show / Hide Table of Contents

    Class ShortShaTokenRule

    Applies rules for the short sha token.

    Inheritance
    System.Object
    ShortShaTokenRule
    Implements
    ITokenRule<System.String>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: SimpleVersion.Rules
    Assembly: SimpleVersion.Core.dll
    Syntax
    public class ShortShaTokenRule : ITokenRule<string>

    Properties

    | Improve this Doc View Source

    Instance

    Gets a default instance of the rule.

    Declaration
    public static ShortShaTokenRule Instance { get; }
    Property Value
    Type Description
    ShortShaTokenRule
    | Improve this Doc View Source

    Token

    Gets the token string.

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

    Methods

    | Improve this Doc View Source

    Apply(IVersionContext, IEnumerable<String>)

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

    Declaration
    public IEnumerable<string> Apply(IVersionContext context, IEnumerable<string> input)
    Parameters
    Type Name Description
    IVersionContext context

    The context of the current calculation.

    System.Collections.Generic.IEnumerable<System.String> input
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

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

    | Improve this Doc View Source

    Resolve(IVersionContext, String)

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

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

    The context of the current calculation.

    System.String value
    Returns
    Type Description
    System.String

    An instance of T with the tokens replaced.

    Implements

    ITokenRule<T>

    Extension Methods

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