Class SemVer.Builder
An inner static Builder class used for building the SemVer object with various criteria. This uses the builder fluent API pattern. All of the attributes in this Builder class correspond to the attributes in the containing SemVer class.
Inheritance
Namespace: Ellucian.Ethos.Integration.Config
Assembly: Ellucian.Ethos.Integration.dll
Syntax
public class Builder : object
Constructors
Builder()
No-arg constructor for the Builder. Sets all version values to 0.
Declaration
public Builder()
Builder(String)
A Builder constructor that takes a version string which should have a value in SemVer notation, e.g. 12.0.1, or 11, or 9.2. Attempts to parse the version into the appropriate major, minor, and/or patch values.
Declaration
public Builder(string version)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | version | The version value in SemVer notation to parse into the major, minor, and/or patch values. |
Fields
major
The major version.
Declaration
int major
Field Value
| Type | Description |
|---|---|
| System.Int32 |
minor
The minor version.
Declaration
int minor
Field Value
| Type | Description |
|---|---|
| System.Int32 |
patch
The patch version.
Declaration
int patch
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
Build()
Builds a SemVer object with the given major, minor, and patch values that have been set in the builder.
Declaration
public SemVer Build()
Returns
| Type | Description |
|---|---|
| SemVer | A SemVer object containing the major, minor, and patch values from the builder. |
WithMajor(Int32)
Sets the given major value for the version in the builder.
Declaration
public SemVer.Builder WithMajor(int major)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | major | The major value to set. |
Returns
| Type | Description |
|---|---|
| SemVer.Builder | This builder instance with the major value set. |
WithMinor(Int32)
Sets the given minor value for the version in the builder.
Declaration
public SemVer.Builder WithMinor(int minor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | minor | The minor value to set. |
Returns
| Type | Description |
|---|---|
| SemVer.Builder | This builder instance with the minor value set. |
WithPatch(Int32)
Sets the given patch value for the version in the builder.
Declaration
public SemVer.Builder WithPatch(int patch)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | patch | The patch value to set. |
Returns
| Type | Description |
|---|---|
| SemVer.Builder | This builder instance with the patch value set. |