Ejemplo n.º 1
0
 /************************ Construction ***********************************/
 /*----------------------- GitContext ------------------------------------*/
 /// <summary>
 /// Injection constructor
 /// </summary>
 /// <param name="localFactory">
 /// Local repository factory
 /// </param>
 /// <param name="remoteFactory">
 /// Remote repository factory
 /// </param>
 /// <param name="gitExec">
 /// Git executor
 /// </param>
 /// <param name="lfsExec">
 /// LFS executor
 /// </param>
 public GitContext(
     IGitCacheConfiguration gitCacheConfiguration,
     ILocalRepositoryFactory localFactory,
     IRemoteRepositoryFactory remoteFactory,
     IGitExecuter gitExec,
     IGitLFSExecuter lfsExec)
 {
     if (null == (Configuration = gitCacheConfiguration))
     {
         throw new ArgumentNullException(nameof(gitCacheConfiguration), "Missing git-cache configuration");
     }
     if (null == (LocalFactory = localFactory))
     {
         throw new ArgumentNullException(nameof(localFactory), "Missing required local repository factory");
     }
     if (null == (RemoteFactory = remoteFactory))
     {
         throw new ArgumentNullException(nameof(remoteFactory), "Remote repository factory must be valid");
     }
     if (null == (GitExecuter = gitExec))
     {
         throw new ArgumentNullException(nameof(gitExec), "Git executor must be valid");
     }
     if (null == (LFSExecuter = lfsExec))
     {
         throw new ArgumentNullException(nameof(lfsExec), "LFS executor must be valid");
     }
 } /* End of Function - GitContext */
Ejemplo n.º 2
0
 /************************ Construction ***********************************/
 /*----------------------- RemoteStatus ----------------------------------*/
 /// <summary>
 /// Injection constructor
 /// </summary>
 /// <param name="gitExecuter">
 /// Reference to a valid <see cref="IGitExecuter"/> object, for performing
 /// a dry run fetch operation
 /// </param>
 public RemoteStatus(IGitExecuter gitExecuter)
 {
     if (null == (GitExecutor = gitExecuter))
     {
         throw new ArgumentNullException(nameof(gitExecuter), "A valid Git executor must be specified");
     }
 } /* End of Function - RemoteStatus */