/// <inheritdoc />
 public Project(ProjectEnumerator projectEnumerator)
     : base(projectEnumerator)
 {
     Filter      = projectEnumerator.GetFilter();
     Priority    = projectEnumerator.GetPriority();
     IsBuildTool = projectEnumerator is BuildToolProjectEnumerator;
     if (!IsBuildTool)
     {
         SourcesFilterOrigin = projectEnumerator.GetSourceFiltersOrigin();
         BuildType
             = new CollectorContainer <ProjectBuildType>(projectEnumerator.GetBuildType);
         OutputPath
             = new CollectorContainer <string>((p, c) => Path.Combine(projectEnumerator.GetOutputDir(p, c), projectEnumerator.GetOutputFileName(p, c)));
         ImportLibraryOutputPath
             = new CollectorContainer <string>(projectEnumerator.GetImportLibraryOutputPath);
         Files
             = new CollectorContainer <ProjectFile[]>((p, c) => projectEnumerator.EnumerateSourceFiles(p, c).ToArray());
         HeaderDirectories
             = new CollectorContainer <string[]>((p, c) => projectEnumerator.EnumerateHeaderDirectories(p, c).ToArray());
         Dependencies
             = new CollectorContainer <Dependency[]>((p, c) => projectEnumerator.EnumerateDependencies(p, c).ToArray());
         Macros
             = new CollectorContainer <ProjectMacro[]>((p, c) => projectEnumerator.EnumerateMacros(p, c).ToArray());
     }
     else
     {
         GeneratorOutputPath = ((BuildToolProjectEnumerator)projectEnumerator).GetProjectFile();
     }
 }
Example #2
0
 /// <summary>
 /// Initializes a new generic collector cache.
 /// </summary>
 /// <param name="enumerator">Collector which dynamic properties would be cached.</param>
 protected Collector(CollectorEnumerator enumerator)
 {
     Name        = enumerator.GetName();
     Source      = enumerator.GetSource();
     Location    = enumerator.GetLocation();
     Enumerator  = enumerator;
     IsSupported = new CollectorContainer <bool>(enumerator.GetIsSupported);
 }
 /// <inheritdoc />
 public Dependency(DependencyEnumerator dependencyEnumerator)
     : base(dependencyEnumerator)
 {
     HeaderDirectories
         = new CollectorContainer <string[]>((p, c) => dependencyEnumerator.EnumerateHeaderDirectories(p, c).ToArray());
     LinkedLibraries
         = new CollectorContainer <DependencyFile[]>((p, c) => dependencyEnumerator.EnumerateLinkedLibraries(p, c).ToArray());
     CopyFiles
         = new CollectorContainer <DependencyFile[]>((p, c) => dependencyEnumerator.EnumerateCopyFiles(p, c).ToArray());
 }