SimpleVersion
Search Results for

    Show / Hide Table of Contents

    Class BaseBranchNameTokenRule

    Base implementation to apply rules for branch name tokens.

    Inheritance
    System.Object
    BaseBranchNameTokenRule
    BranchNameSuffixTokenRule
    BranchNameTokenRule
    ShortBranchNameTokenRule
    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 abstract class BaseBranchNameTokenRule : ITokenRule<string>

    Constructors

    | Improve this Doc View Source

    BaseBranchNameTokenRule()

    Initializes a new instance of the BaseBranchNameTokenRule class.

    Declaration
    protected BaseBranchNameTokenRule()
    | Improve this Doc View Source

    BaseBranchNameTokenRule(String)

    Initializes a new instance of the BaseBranchNameTokenRule class with an optional regular expression pattern.

    Declaration
    protected BaseBranchNameTokenRule(string pattern)
    Parameters
    Type Name Description
    System.String pattern

    The regular expression pattern to use when replacing characters.

    Properties

    | Improve this Doc View Source

    Pattern

    Gets or sets the resolved pattern used to replace non-required characters.

    Declaration
    public Regex Pattern { get; protected set; }
    Property Value
    Type Description
    System.Text.RegularExpressions.Regex
    | Improve this Doc View Source

    Token

    Gets the token string.

    Declaration
    public abstract string Token { get; protected set; }
    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 virtual IEnumerable<string> Apply(IVersionContext context, IEnumerable<string> value)
    Parameters
    Type Name Description
    IVersionContext context

    The context of the current calculation.

    System.Collections.Generic.IEnumerable<System.String> value
    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 virtual 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.

    | Improve this Doc View Source

    ResolveBranchName(IVersionContext)

    Resolves the branch name value for this rule.

    Declaration
    protected abstract string ResolveBranchName(IVersionContext context)
    Parameters
    Type Name Description
    IVersionContext context

    The VersionContext of the current calculation.

    Returns
    Type Description
    System.String

    The branch name value.

    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