public Project(PackageSpec packageSpec) { BaseDirectory = Path.GetDirectoryName(packageSpec.FilePath); Metadata = packageSpec; Files = new ProjectFilesCollection(packageSpec.Properties, packageSpec.BaseDirectory, packageSpec.FilePath); // Load additional metadata from the project json EntryPoint = Metadata.Properties.GetValue<string>("entryPoint"); var commands = Metadata.Properties["commands"] as JObject; if (commands != null) { foreach (var command in commands) { Commands[command.Key] = command.Value.Value<string>(); } } }
public Project(PackageSpec packageSpec) { BaseDirectory = Path.GetDirectoryName(packageSpec.FilePath); Metadata = packageSpec; Files = new ProjectFilesCollection(packageSpec.Properties, packageSpec.BaseDirectory, packageSpec.FilePath); // Load additional metadata from the project json EntryPoint = Metadata.Properties.GetValue <string>("entryPoint"); var commands = Metadata.Properties["commands"] as JObject; if (commands != null) { foreach (var command in commands) { Commands[command.Key] = command.Value.Value <string>(); } } }
internal static CompilationFiles GetCompilationFiles(this ProjectFilesCollection collection) { return(new CompilationFiles( collection.PreprocessSourceFiles, collection.SourceFiles)); }