/// <summary> /// Initializes a new instance of the <see cref="ProjectToLibraryBuilder"/> class. /// </summary> /// <param name="library">The library.</param> /// <param name="solutionRewriter">The solution rewriter.</param> /// <param name="walkerFactory">The walker factory.</param> /// <param name="log">The log.</param> /// <exception cref="System.ArgumentException"> /// library /// or /// solutionRewriter /// or /// walkerFactory /// or /// log /// </exception> public ProjectToLibraryBuilder(ILibrary library, IPackageContentSelector contentSelector, ISolutionRewriter solutionRewriter, Func <ProjectContext, IDependencyWalker> walkerFactory, ILog log, Maybe <Action <Project> > analyzeResult) { _library = library ?? throw new ArgumentException(nameof(library)); _contentSelector = contentSelector ?? throw new ArgumentException(nameof(contentSelector)); _solutionRewriter = solutionRewriter ?? throw new ArgumentException(nameof(solutionRewriter)); _walkerFactory = walkerFactory ?? throw new ArgumentException(nameof(walkerFactory)); _log = log ?? throw new ArgumentException(nameof(log)); _analyzeResult = analyzeResult; }
/// <summary> /// Initializes a new instance of the <see cref="SolutionToLibraryBuilder{T}" /> class. /// </summary> /// <param name="verifyingCompiler">The .net compiler used to verify builds.</param> /// <param name="solutionFile">The solution file.</param> /// <param name="workspaceFactory">The factory method that gets the workspace containing the solution.</param> /// <param name="solutionRewriter">The solution rewriter.</param> /// <param name="walkerFactory">The walker factory.</param> /// <param name="contentSelector">The content selector.</param> /// <param name="assemblyAnalyzer">The assembly analyzer.</param> /// <param name="log">The log.</param> /// <param name="openSolution">A method that opens the solution in the workspace, given the provided solution path (if required).</param> /// <exception cref="System.ArgumentException">verifyingCompiler /// or /// solutionFile /// or /// workspaceFactory /// or /// log</exception> /// <exception cref="System.ArgumentNullException"> /// assemblyAnalyzer /// or /// contentSelector /// </exception> public SolutionToLibraryBuilder( ICompiler verifyingCompiler, IFileInfo solutionFile, Func <T> workspaceFactory, ISolutionRewriter solutionRewriter, Func <ProjectContext, IDependencyWalker> walkerFactory, IPackageContentSelector contentSelector, Maybe <Action <Project> > analyzeResult, ILog log, Func <T, string, Solution> openSolution = null) { _compiler = verifyingCompiler ?? throw new ArgumentException(nameof(verifyingCompiler)); _solutionFile = solutionFile ?? throw new ArgumentException(nameof(solutionFile)); _workspaceFactory = workspaceFactory ?? throw new ArgumentException(nameof(workspaceFactory)); _solutionRewriter = solutionRewriter ?? throw new ArgumentException(nameof(solutionRewriter)); _walkerFactory = walkerFactory ?? throw new ArgumentException(nameof(walkerFactory)); _log = log ?? throw new ArgumentException(nameof(log)); _contentSelector = contentSelector ?? throw new ArgumentNullException(nameof(contentSelector)); _analyzeResult = analyzeResult; _openSolution = openSolution; }