public GitVersionCalculator(ILog log, IConfigProvider configProvider,
                             IGitVersionCache gitVersionCache, INextVersionCalculator nextVersionCalculator, IVariableProvider variableProvider,
                             IOptions <Arguments> options, IGitVersionCacheKeyFactory cacheKeyFactory)
 {
     this.log                   = log ?? throw new ArgumentNullException(nameof(log));
     this.configProvider        = configProvider ?? throw new ArgumentNullException(nameof(configProvider));
     this.gitVersionCache       = gitVersionCache ?? throw new ArgumentNullException(nameof(gitVersionCache));
     this.nextVersionCalculator = nextVersionCalculator ?? throw new ArgumentNullException(nameof(nextVersionCalculator));
     this.variableProvider      = variableProvider ?? throw new ArgumentNullException(nameof(variableProvider));
     this.options               = options ?? throw new ArgumentNullException(nameof(options));
     this.cacheKeyFactory       = cacheKeyFactory ?? throw new ArgumentNullException(nameof(cacheKeyFactory));
 }
Пример #2
0
 public GitVersionCalculator(ILog log, IConfigProvider configProvider, IBuildServerResolver buildServerResolver,
                             IGitVersionCache gitVersionCache, IGitVersionFinder gitVersionFinder, IGitPreparer gitPreparer, IVariableProvider variableProvider,
                             IOptions <Arguments> options, IGitVersionCacheKeyFactory cacheKeyFactory)
 {
     this.log                 = log ?? throw new ArgumentNullException(nameof(log));
     this.configProvider      = configProvider ?? throw new ArgumentNullException(nameof(configProvider));
     this.buildServerResolver = buildServerResolver ?? throw new ArgumentNullException(nameof(buildServerResolver));
     this.gitVersionCache     = gitVersionCache ?? throw new ArgumentNullException(nameof(gitVersionCache));
     this.gitVersionFinder    = gitVersionFinder ?? throw new ArgumentNullException(nameof(gitVersionFinder));
     this.gitPreparer         = gitPreparer ?? throw new ArgumentNullException(nameof(gitPreparer));
     this.variableProvider    = variableProvider ?? throw new ArgumentNullException(nameof(variableProvider));
     this.options             = options ?? throw new ArgumentNullException(nameof(options));
     this.cacheKeyFactory     = cacheKeyFactory ?? throw new ArgumentNullException(nameof(cacheKeyFactory));
 }
    public GitVersionCalculateTool(ILog log, INextVersionCalculator nextVersionCalculator,
                                   IVariableProvider variableProvider, IGitPreparer gitPreparer,
                                   IGitVersionCache gitVersionCache, IGitVersionCacheKeyFactory cacheKeyFactory,
                                   IOptions <GitVersionOptions> options, Lazy <GitVersionContext> versionContext)
    {
        this.log = log.NotNull();

        this.nextVersionCalculator = nextVersionCalculator.NotNull();
        this.variableProvider      = variableProvider.NotNull();
        this.gitPreparer           = gitPreparer.NotNull();

        this.cacheKeyFactory = cacheKeyFactory.NotNull();
        this.gitVersionCache = gitVersionCache.NotNull();

        this.options        = options.NotNull();
        this.versionContext = versionContext.NotNull();
    }
Пример #4
0
    public GitVersionCalculateTool(ILog log, INextVersionCalculator nextVersionCalculator,
                                   IVariableProvider variableProvider, IGitPreparer gitPreparer,
                                   IGitVersionCache gitVersionCache, IGitVersionCacheKeyFactory cacheKeyFactory,
                                   IOptions <GitVersionOptions> options, Lazy <GitVersionContext> versionContext)
    {
        this.log = log ?? throw new ArgumentNullException(nameof(log));

        this.nextVersionCalculator = nextVersionCalculator ?? throw new ArgumentNullException(nameof(nextVersionCalculator));
        this.variableProvider      = variableProvider ?? throw new ArgumentNullException(nameof(variableProvider));
        this.gitPreparer           = gitPreparer ?? throw new ArgumentNullException(nameof(gitPreparer));

        this.cacheKeyFactory = cacheKeyFactory ?? throw new ArgumentNullException(nameof(cacheKeyFactory));
        this.gitVersionCache = gitVersionCache ?? throw new ArgumentNullException(nameof(gitVersionCache));

        this.options        = options ?? throw new ArgumentNullException(nameof(options));
        this.versionContext = versionContext ?? throw new ArgumentNullException(nameof(versionContext));
    }
Пример #5
0
        public GitVersionTool(ILog log, INextVersionCalculator nextVersionCalculator, IVariableProvider variableProvider, IGitPreparer gitPreparer,
                              IGitVersionCache gitVersionCache, IGitVersionCacheKeyFactory cacheKeyFactory,
                              IOutputGenerator outputGenerator, IWixVersionFileUpdater wixVersionFileUpdater, IGitVersionInfoGenerator gitVersionInfoGenerator, IAssemblyInfoFileUpdater assemblyInfoFileUpdater,
                              IOptions <GitVersionOptions> options, Lazy <GitVersionContext> versionContext)
        {
            this.log = log ?? throw new ArgumentNullException(nameof(log));

            this.nextVersionCalculator = nextVersionCalculator ?? throw new ArgumentNullException(nameof(nextVersionCalculator));
            this.variableProvider      = variableProvider ?? throw new ArgumentNullException(nameof(variableProvider));
            this.gitPreparer           = gitPreparer ?? throw new ArgumentNullException(nameof(gitPreparer));

            this.cacheKeyFactory = cacheKeyFactory ?? throw new ArgumentNullException(nameof(cacheKeyFactory));
            this.gitVersionCache = gitVersionCache ?? throw new ArgumentNullException(nameof(gitVersionCache));

            this.outputGenerator         = outputGenerator ?? throw new ArgumentNullException(nameof(outputGenerator));
            this.wixVersionFileUpdater   = wixVersionFileUpdater ?? throw new ArgumentNullException(nameof(wixVersionFileUpdater));
            this.gitVersionInfoGenerator = gitVersionInfoGenerator ?? throw new ArgumentNullException(nameof(gitVersionInfoGenerator));
            this.assemblyInfoFileUpdater = assemblyInfoFileUpdater ?? throw new ArgumentNullException(nameof(gitVersionInfoGenerator));

            this.options        = options ?? throw new ArgumentNullException(nameof(options));
            this.versionContext = versionContext ?? throw new ArgumentNullException(nameof(versionContext));
        }
Пример #6
0
        public GitVersionTool(ILog log, INextVersionCalculator nextVersionCalculator, IVariableProvider variableProvider, IConsole console,
                              IGitVersionCache gitVersionCache, IGitVersionCacheKeyFactory cacheKeyFactory, IBuildServerResolver buildServerResolver,
                              IWixVersionFileUpdater wixVersionFileUpdater, IGitVersionInformationGenerator gitVersionInformationGenerator, IAssemblyInfoFileUpdater assemblyInfoFileUpdater,
                              IOptions <Arguments> options, Lazy <GitVersionContext> versionContext)
        {
            this.log     = log ?? throw new ArgumentNullException(nameof(log));
            this.console = console ?? throw new ArgumentNullException(nameof(console));

            this.nextVersionCalculator = nextVersionCalculator ?? throw new ArgumentNullException(nameof(nextVersionCalculator));
            this.variableProvider      = variableProvider ?? throw new ArgumentNullException(nameof(variableProvider));

            this.cacheKeyFactory = cacheKeyFactory ?? throw new ArgumentNullException(nameof(cacheKeyFactory));
            this.gitVersionCache = gitVersionCache ?? throw new ArgumentNullException(nameof(gitVersionCache));

            this.wixVersionFileUpdater          = wixVersionFileUpdater ?? throw new ArgumentNullException(nameof(wixVersionFileUpdater));
            this.gitVersionInformationGenerator = gitVersionInformationGenerator ?? throw new ArgumentNullException(nameof(gitVersionInformationGenerator));
            this.assemblyInfoFileUpdater        = assemblyInfoFileUpdater ?? throw new ArgumentNullException(nameof(gitVersionInformationGenerator));

            this.options        = options ?? throw new ArgumentNullException(nameof(options));
            this.versionContext = versionContext ?? throw new ArgumentNullException(nameof(versionContext));

            buildServer = buildServerResolver.Resolve();
        }