PageRenderTime 18ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Mercurial.Net/PersistentClientFactory.cs

#
C# | 29 lines | 11 code | 1 blank | 17 comment | 0 complexity | 98e01239aafc7eef3e5c40bdd35532e1 MD5 | raw file
 1using System;
 2
 3namespace Mercurial
 4{
 5    /// <summary>
 6    /// This class implements <see cref="IClientFactory"/> by always constructing objects
 7    /// of type <see cref="PersistentClient"/>.
 8    /// </summary>
 9    public sealed class PersistentClientFactory : IClientFactory
10    {
11        /// <summary>
12        /// Creates a new <see cref="IClient"/> object for use by the <see cref="Repository"/>.
13        /// </summary>
14        /// <param name="repositoryPath">
15        /// The path to the repository to manage by the <see cref="IClient"/> and the
16        /// <see cref="Repository"/>.
17        /// </param>
18        /// <returns>
19        /// The <see cref="IClient"/> implementation to use.
20        /// </returns>
21        /// <exception cref="ArgumentNullException">
22        /// <para><paramref name="repositoryPath"/> is <c>null</c> or empty.</para>
23        /// </exception>
24        public IClient CreateClient(string repositoryPath)
25        {
26            return new PersistentClient(repositoryPath);
27        }
28    }
29}