SolutionInfo.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) .NET Foundation. All rights reserved.
  2. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  3. using System;
  4. using System.Collections.Generic;
  5. namespace RepoTasks.ProjectModel
  6. {
  7. internal class SolutionInfo
  8. {
  9. public SolutionInfo(string fullPath, string configName, IReadOnlyList<ProjectInfo> projects, bool shouldBuild, bool shipped)
  10. {
  11. if (string.IsNullOrEmpty(fullPath))
  12. {
  13. throw new ArgumentException(nameof(fullPath));
  14. }
  15. if (string.IsNullOrEmpty(configName))
  16. {
  17. throw new ArgumentException(nameof(configName));
  18. }
  19. FullPath = fullPath;
  20. ConfigName = configName;
  21. Projects = projects ?? throw new ArgumentNullException(nameof(projects));
  22. ShouldBuild = shouldBuild;
  23. Shipped = shipped;
  24. }
  25. public string FullPath { get; }
  26. public string ConfigName { get; }
  27. public IReadOnlyList<ProjectInfo> Projects { get; }
  28. public bool ShouldBuild { get; }
  29. public bool Shipped { get; }
  30. }
  31. }