C# Класс Mercurial.AutoSwitchingClientFactory

This class implements IClientFactory by constructing either a NonPersistentClient or PersistentClient depending on circumstances, and also implements IClientSwitcher to allow for switching before or after certain commands.
Наследование: IClientFactory, IClientSwitcher
Показать файл Открыть проект

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

Метод Описание
CreateClient ( string repositoryPath ) : IClient

Creates a new IClient object for use by the Repository.

SwitchAfterCommand ( IMercurialCommand command, IClient currentClient ) : IClient

Determines if the client should be switched out after the specific command has executed. If it is switched out, the old client should be disposed of, and a new client should be returned. If it is not switched out, the current client should be simply returned. This method is only called upon successful execution of the command.

SwitchBeforeCommand ( IMercurialCommand command, IClient currentClient ) : IClient

Determines if the client should be switched out before the specific command is executed. If it is switched out, the old client should be disposed of, and a new client should be returned. If it is not switched out, the current client should be simply returned.

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

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

Creates a new IClient object for use by the Repository.
/// is null or empty. ///
public CreateClient ( string repositoryPath ) : IClient
repositoryPath string /// The path to the repository to manage by the and the /// . ///
Результат IClient

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

Determines if the client should be switched out after the specific command has executed. If it is switched out, the old client should be disposed of, and a new client should be returned. If it is not switched out, the current client should be simply returned. This method is only called upon successful execution of the command.
/// is null. /// - or - /// is null. ///
public SwitchAfterCommand ( IMercurialCommand command, IClient currentClient ) : IClient
command IMercurialCommand /// The command that was successfully executed. ///
currentClient IClient /// The current implementation. ///
Результат IClient

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

Determines if the client should be switched out before the specific command is executed. If it is switched out, the old client should be disposed of, and a new client should be returned. If it is not switched out, the current client should be simply returned.
/// is null. /// - or - /// is null. ///
public SwitchBeforeCommand ( IMercurialCommand command, IClient currentClient ) : IClient
command IMercurialCommand /// The command that is about to be executed. ///
currentClient IClient /// The current implementation. ///
Результат IClient