4 using System.Collections.Generic;
5 using System.Collections.ObjectModel;
6 using System.Diagnostics;
8 using SiliconStudio.Core;
10 namespace SiliconStudio.Assets
15 [DataContract(
"SolutionPlatform")]
24 DefineConstants =
new List<string>();
47 public List<string> DefineConstants {
get;
private set; }
54 public bool IsAvailable {
get; set; }
70 var parts =
new List<SolutionPlatformPart>(1 + PlatformsPart.Count) {
this };
71 parts.AddRange(PlatformsPart);
73 return parts.OrderBy(part => part.SolutionName ?? part.Name, StringComparer.InvariantCultureIgnoreCase);
78 if (part == null)
throw new ArgumentNullException(
"part");
81 foreach (var property
in part.
Configurations[configuration].Properties)
83 yield
return property;
89 foreach (var property
in Configurations[configuration].Properties)
91 yield
return property;
100 [DebuggerDisplay(
"Solution {Name} Configs [{Configurations.Count}]")]
108 UseWithExecutables =
true;
109 UseWithLibraries =
true;
110 IncludeInSolution =
true;
121 if (name == null)
throw new ArgumentNullException(
"name");
129 public string Name {
get; set; }
135 public string SolutionName {
get; set; }
143 public string DisplayName {
get; set; }
149 public string SafeSolutionName
153 return SolutionName ?? Name;
163 public string Cpu {
get; set; }
170 public string Alias {
get; set; }
176 public bool InheritConfigurations {
get; set; }
183 public bool UseWithExecutables {
get; set; }
184 public bool UseWithLibraries {
get; set; }
185 public bool IncludeInSolution {
get; set; }
187 public string LibraryProjectName {
get; set; }
188 public string ExecutableProjectName {
get; set; }
197 return (projectType !=
ProjectType.Executable || UseWithExecutables) && (projectType != ProjectType.Library || UseWithLibraries);
208 case ProjectType.Executable:
209 return ExecutableProjectName ?? Alias ?? SafeSolutionName;
210 case ProjectType.Library:
211 return LibraryProjectName ?? Alias ?? SafeSolutionName;
213 throw new ArgumentOutOfRangeException(
"projectType");
221 [DataContract(
"SolutionPlatformPartCollection")]
233 [DataContract(
"SolutionConfigurationCollection")]
245 [DataContract(
"SolutionConfiguration")]
246 [DebuggerDisplay(
"Config [{Name}]")]
254 if (name == null)
throw new ArgumentNullException(
"name");
256 Properties =
new List<string>();
263 public string Name {
get;
private set; }
269 public bool IsDebug {
get; set; }
275 public List<string> Properties {
get;
private set; }
A collection of SolutionConfiguration
SolutionConfiguration(string name)
Initializes a new instance of the SolutionConfiguration class.
PlatformType
Describes the platform operating system.
override string GetKeyForItem(SolutionConfiguration item)
ProjectType
Type of the project.
A solution configuration used by SolutionPlatform
A collection of properties.