C# Класс SimpleGitVersion.SimpleRepositoryInfo

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
HandleRepositoryInfoError bool

Открытые методы

Метод Описание
BuildAssemblyVersionAttributesFile ( string toolName = "SimpleGitVersion.Core", string assemblyInformationalVersionInfo = null ) : string

Builds a standard assembly version attributes file.

FomatStandardAssemblyInformationalVersionInfo ( string nuGetVersion, string commitSha, string userName ) : string

Fomats the standard assembly informational version information: "NuGetVersion Sha:... User:..."

FormatAssemblyVersionAttributesFile ( string majorMinor, string fileVersion, string semVer, string toolName, string assemblyInformationalVersionInfo ) : string

Formats the assembly version attributes file.

LoadFromPath ( ILogger logger, string path, Action optionsChecker = null ) : SimpleRepositoryInfo

Creates a new SimpleRepositoryInfo based on a path (that can be below the folder with the '.git' sub folder).

LogValidVersions ( ILogger logger, RepositoryInfo info ) : void
SetInvalidValues ( string reason ) : void
SetInvalidValuesAndLog ( ILogger logger, string reason, bool isWarning ) : void
SetNumericalVersionValues ( ReleaseTagVersion t, bool isCIBuild ) : void
SimpleRepositoryInfo ( ILogger logger, RepositoryInfo info ) : System

Initializes a new SimpleRepositoryInfo based on a (more complex) Info.

Приватные методы

Метод Описание
HandleRepositoryInfoError ( ILogger logger, RepositoryInfo info ) : bool

Описание методов

BuildAssemblyVersionAttributesFile() публичный Метод

Builds a standard assembly version attributes file.
public BuildAssemblyVersionAttributesFile ( string toolName = "SimpleGitVersion.Core", string assemblyInformationalVersionInfo = null ) : string
toolName string Name of the tool.
assemblyInformationalVersionInfo string /// The assembly informational version information. /// Defaults to . ///
Результат string

FomatStandardAssemblyInformationalVersionInfo() публичный статический Метод

Fomats the standard assembly informational version information: "NuGetVersion Sha:... User:..."
public static FomatStandardAssemblyInformationalVersionInfo ( string nuGetVersion, string commitSha, string userName ) : string
nuGetVersion string The NuGet version.
commitSha string The commit sha.
userName string Name of the user.
Результат string

FormatAssemblyVersionAttributesFile() публичный статический Метод

Formats the assembly version attributes file.
public static FormatAssemblyVersionAttributesFile ( string majorMinor, string fileVersion, string semVer, string toolName, string assemblyInformationalVersionInfo ) : string
majorMinor string The major.minor: this is used for the AssemblVersion.
fileVersion string The file version (4 numbers between 0 and 65535.
semVer string The semantic version version.
toolName string Name of the tool.
assemblyInformationalVersionInfo string The assembly informational version information.
Результат string

LoadFromPath() публичный статический Метод

Creates a new SimpleRepositoryInfo based on a path (that can be below the folder with the '.git' sub folder).
public static LoadFromPath ( ILogger logger, string path, Action optionsChecker = null ) : SimpleRepositoryInfo
logger ILogger Logger that will be used.
path string The path to lookup.
optionsChecker Action /// Optional action that accepts the logger, a boolean that is true if a RepositoryInfo.xml has been /// found, and the that will be used. ///
Результат SimpleRepositoryInfo

LogValidVersions() публичный Метод

public LogValidVersions ( ILogger logger, RepositoryInfo info ) : void
logger ILogger
info RepositoryInfo
Результат void

SetInvalidValues() публичный Метод

public SetInvalidValues ( string reason ) : void
reason string
Результат void

SetInvalidValuesAndLog() публичный Метод

public SetInvalidValuesAndLog ( ILogger logger, string reason, bool isWarning ) : void
logger ILogger
reason string
isWarning bool
Результат void

SetNumericalVersionValues() публичный Метод

public SetNumericalVersionValues ( ReleaseTagVersion t, bool isCIBuild ) : void
t ReleaseTagVersion
isCIBuild bool
Результат void

SimpleRepositoryInfo() публичный Метод

Initializes a new SimpleRepositoryInfo based on a (more complex) Info.
public SimpleRepositoryInfo ( ILogger logger, RepositoryInfo info ) : System
logger ILogger Logger that will be used.
info RepositoryInfo The simplified repository information.
Результат System