Class HeightTokenRule
Applies rules for the height.
Inheritance
System.Object
HeightTokenRule
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 HeightTokenRule : ITokenRule<string>
Constructors
| Improve this Doc View SourceHeightTokenRule()
Initializes a new instance of the HeightTokenRule class.
Declaration
public HeightTokenRule()
HeightTokenRule(Boolean)
Initializes a new instance of the HeightTokenRule class.
Declaration
public HeightTokenRule(bool padded)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | padded | True if the value should be padded. |
Properties
| Improve this Doc View SourceInstance
Gets a default instance of the rule.
Declaration
public static HeightTokenRule Instance { get; }
Property Value
Type | Description |
---|---|
HeightTokenRule |
Padded
Gets a value indicating whether padding should be applied.
Declaration
public bool Padded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Token
Gets the token string.
Declaration
public string Token { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceApply(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 |
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 |