/Mercurial.Net/PersistentClientFactory.cs
C# | 29 lines | 11 code | 1 blank | 17 comment | 0 complexity | 98e01239aafc7eef3e5c40bdd35532e1 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0
- using System;
-
- namespace Mercurial
- {
- /// <summary>
- /// This class implements <see cref="IClientFactory"/> by always constructing objects
- /// of type <see cref="PersistentClient"/>.
- /// </summary>
- public sealed class PersistentClientFactory : IClientFactory
- {
- /// <summary>
- /// Creates a new <see cref="IClient"/> object for use by the <see cref="Repository"/>.
- /// </summary>
- /// <param name="repositoryPath">
- /// The path to the repository to manage by the <see cref="IClient"/> and the
- /// <see cref="Repository"/>.
- /// </param>
- /// <returns>
- /// The <see cref="IClient"/> implementation to use.
- /// </returns>
- /// <exception cref="ArgumentNullException">
- /// <para><paramref name="repositoryPath"/> is <c>null</c> or empty.</para>
- /// </exception>
- public IClient CreateClient(string repositoryPath)
- {
- return new PersistentClient(repositoryPath);
- }
- }
- }