Class VersionManagerCommon
Adds new section to binary files using utility written on Delphi
Inheritance
Namespace: BuildSystem.VersionManager.Common
Assembly: BuildSystem.Core.dll
Syntax
public class VersionManagerCommon : Object, IVersionManager, IManager
Constructors
VersionManagerCommon(ILogger?, VersionManagerCommonProps, string)
Adds new section to binary files using utility written on Delphi
Declaration
public VersionManagerCommon(ILogger? logger, VersionManagerCommonProps props, string tempDir)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logger |
VersionManagerCommonProps | props | Properties which are the main for classes implementors of IVersionManager |
string | tempDir | Parent folder for temporary files |
Fields
ClassIdent
Unique ident of class
Declaration
public const string ClassIdent = "VersionManager.Common"
Field Value
Type | Description |
---|---|
string |
Properties
Logger
Declaration
public ILogger? Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Props
Declaration
public IManagerProp Props { get; }
Property Value
Type | Description |
---|---|
IManagerProp |
Methods
CalcNextVersion(IPackageProps, bool, GetVersionList, GetPackageInfo)
Increment version. Returns non-incremented version if package with same hash already exists on server
Declaration
public bool CalcNextVersion(IPackageProps packageProps, bool force, GetVersionList getVersionList, GetPackageInfo getPackageInfo)
Parameters
Type | Name | Description |
---|---|---|
IPackageProps | packageProps | Properties of updating package |
bool | force | Force increase, even if package with same hash exists on server |
GetVersionList | getVersionList | Function to get all available versions from package repository |
GetPackageInfo | getPackageInfo | Function to get all information from package repository |
Returns
Type | Description |
---|---|
bool | True if version was changed |
IncrementVersion(VersionProp)
Increase version according to properties of current manager
Declaration
public VersionProp IncrementVersion(VersionProp version)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | version |
Returns
Type | Description |
---|---|
VersionProp |
IncrementVersion(string)
Increase version according to properties of current manager
Declaration
public string IncrementVersion(string version)
Parameters
Type | Name | Description |
---|---|---|
string | version |
Returns
Type | Description |
---|---|
string |
VersionIsSuitable(VersionProp)
Return flag, that version accord to current branch
Declaration
public bool VersionIsSuitable(VersionProp version)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | version |
Returns
Type | Description |
---|---|
bool |