/*======================= PUBLIC ========================================*/
 /************************ Events *****************************************/
 /************************ Properties *************************************/
 /************************ Construction ***********************************/
 /*----------------------- ReaderWriterLockFilterAsyncAttribute ----------*/
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="config">
 /// Git configuration object
 /// </param>
 /// <param name="gitContext">
 /// Git context object
 /// </param>
 /// <param name="lockManager">
 /// Lock manager
 /// </param>
 /// <param name="logger">
 /// Logger for the object
 /// </param>
 /// <param name="remoteStatusSvc">
 /// Service for getting the reference status
 /// </param>
 public ReaderWriterLockFilterAsyncAttribute(
     IReaderWriterLockManager <string> lockManager,
     ILogger <ReaderWriterLockFilterAsyncAttribute> logger,
     IGitCacheConfiguration config,
     IRemoteStatus remoteStatusSvc,
     IGitContext gitContext)
 {
     if (null == (Manager = lockManager))
     {
         throw new ArgumentNullException(
                   nameof(lockManager), "Lock manager must be a valid value");
     }
     if (null == (Logger = logger))
     {
         throw new ArgumentNullException(
                   nameof(logger), "Logger must be a valid value");
     }
     if (null == (Configuration = config))
     {
         throw new ArgumentNullException(
                   nameof(config), "Configuration must be a valid value");
     }
     if (null == (RemoteStatusService = remoteStatusSvc))
     {
         throw new ArgumentNullException(
                   nameof(remoteStatusSvc), "Remote status service must be a valid value");
     }
     if (null == (GitContext = gitContext))
     {
         throw new ArgumentNullException(
                   nameof(gitContext), "A valid git context must be provided");
     }
 } /* End of Function - ReaderWriterLockFilterAsyncAttribute */
Ejemplo n.º 2
0
 /************************ Construction ***********************************/
 /*----------------------- GitController ---------------------------------*/
 /// <summary>
 /// Constructor for dependency injection
 /// </summary>
 /// <param name="config">
 /// application configuration object
 /// </param>
 /// <param name="localFactory">
 /// Factory for building <see cref="ILocalRepository"/> objects
 /// </param>
 /// <param name="remoteFactory">
 /// Factory for building <see cref="IRemoteRepository"/> objects
 /// </param>
 public GitController(
     IGitContext gitContext,
     IShell shell,
     ILogger <GitController> logger)
     : base()
 {
     if (null == (GitContext = gitContext))
     {
         throw new ArgumentNullException(nameof(gitContext), "A valid git context must be provided");
     }
     if (null == (Shell = shell))
     {
         throw new ArgumentNullException(nameof(shell), "A valid shell object must be provided");
     }
     if (null == (Logger = logger))
     {
         throw new ArgumentNullException(nameof(logger), "A valid logger must be provided");
     }
 } // end of function - GitController