C# Класс CcNet.Labeller.SvnRevisionLabeller

Наследование: ILabeller
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
CalculateElapsedDays int
CalculateMsRevision int
ParseAssemblyInfoVersion void

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

Метод Описание
Generate ( IIntegrationResult resultFromLastBuild ) : string

Returns the label to use for the current build.

Run ( IIntegrationResult result ) : void

Runs the task, given the specified IIntegrationResult, in the specified IProject.

SvnRevisionLabeller ( ) : System

Initializes a new instance of the SvnRevisionLabeller class.

SvnRevisionLabeller ( ISystemClock systemClock ) : System

Initializes a new instance of the SvnRevisionLabeller class.

Защищенные методы

Метод Описание
AppendCommonSwitches ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder buffer ) : void

Appends the arguments required to authenticate against Subversion.

GetRevision ( ) : int

Gets the latest Subversion revision by checking the last log entry.

If an error occurs while parsing the Subversion log, the revision number will be returned as a 0.

ParseVersion ( int revision, IIntegrationResult resultFromLastBuild ) : System.Version

Parses a version string.

Quote ( string urlToBeQuoted ) : string

Ensures that the SVN URL is surrounded with quotation marks, so that paths with spaces in them do not cause an exception.

RunSvnProcess ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder arguments ) : ProcessResult

Runs the Subversion process.

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

Метод Описание
CalculateElapsedDays ( string startDate, System.DateTime currentDate ) : int

Calculates the number of elapsed days.

CalculateMsRevision ( System.DateTime startDate, System.DateTime currentDate ) : int

Calculates the revision using the standard Microsoft format, being the number of seconds since midnight divided by 2.

ParseAssemblyInfoVersion ( ) : void

Instead of taking the major/minor from hard coded cc.net config, parse for it in the source code which is easily settable

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

AppendCommonSwitches() защищенный Метод

Appends the arguments required to authenticate against Subversion.
protected AppendCommonSwitches ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder buffer ) : void
buffer ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder The argument builder.
Результат void

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

Returns the label to use for the current build.
Thrown when an error occurs while formatting the version number using the various formatting tokens. Thrown when an error occurs while formatting the version number and an argument has not been specified.
public Generate ( IIntegrationResult resultFromLastBuild ) : string
resultFromLastBuild IIntegrationResult IntegrationResult from last build used to determine the next label.
Результат string

GetRevision() защищенный Метод

Gets the latest Subversion revision by checking the last log entry.
If an error occurs while parsing the Subversion log, the revision number will be returned as a 0.
protected GetRevision ( ) : int
Результат int

ParseVersion() защищенный Метод

Parses a version string.
protected ParseVersion ( int revision, IIntegrationResult resultFromLastBuild ) : System.Version
revision int The current revision.
resultFromLastBuild IIntegrationResult The result from last build.
Результат System.Version

Quote() защищенный Метод

Ensures that the SVN URL is surrounded with quotation marks, so that paths with spaces in them do not cause an exception.
protected Quote ( string urlToBeQuoted ) : string
urlToBeQuoted string The URL to be quoted.
Результат string

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

Runs the task, given the specified IIntegrationResult, in the specified IProject.
public Run ( IIntegrationResult result ) : void
result IIntegrationResult The label for the current build.
Результат void

RunSvnProcess() защищенный Метод

Runs the Subversion process.
protected RunSvnProcess ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder arguments ) : ProcessResult
arguments ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder The command-line arguments.
Результат ProcessResult

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

Initializes a new instance of the SvnRevisionLabeller class.
public SvnRevisionLabeller ( ) : System
Результат System

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

Initializes a new instance of the SvnRevisionLabeller class.
public SvnRevisionLabeller ( ISystemClock systemClock ) : System
systemClock ISystemClock The system clock implementation that will be used when calculating date-based /// revision numbers.
Результат System