C# Class SimpleGitVersion.SimpleRepositoryInfo

Datei anzeigen Open project: SimpleGitVersion/SGV-Net Class Usage Examples

Private Properties

Property Type Description
HandleRepositoryInfoError bool

Public Methods

Method Description
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.

Private Methods

Method Description
HandleRepositoryInfoError ( ILogger logger, RepositoryInfo info ) : bool

Method Details

BuildAssemblyVersionAttributesFile() public method

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 . ///
return string

FomatStandardAssemblyInformationalVersionInfo() public static method

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.
return string

FormatAssemblyVersionAttributesFile() public static method

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.
return string

LoadFromPath() public static method

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. ///
return SimpleRepositoryInfo

LogValidVersions() public method

public LogValidVersions ( ILogger logger, RepositoryInfo info ) : void
logger ILogger
info RepositoryInfo
return void

SetInvalidValues() public method

public SetInvalidValues ( string reason ) : void
reason string
return void

SetInvalidValuesAndLog() public method

public SetInvalidValuesAndLog ( ILogger logger, string reason, bool isWarning ) : void
logger ILogger
reason string
isWarning bool
return void

SetNumericalVersionValues() public method

public SetNumericalVersionValues ( ReleaseTagVersion t, bool isCIBuild ) : void
t ReleaseTagVersion
isCIBuild bool
return void

SimpleRepositoryInfo() public method

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.
return System