Example #1
0
        internal ProjectState(ProjectState sourceState)
        {
            Name                = sourceState.Name;
            Language            = sourceState.Language;
            ReferenceAssemblies = sourceState.ReferenceAssemblies;
            OutputKind          = sourceState.OutputKind;
            DocumentationMode   = sourceState.DocumentationMode;
            DefaultPrefix       = sourceState.DefaultPrefix;
            DefaultExtension    = sourceState.DefaultExtension;
            Sources             = new SourceFileList(DefaultPrefix, DefaultExtension);

            Sources.AddRange(sourceState.Sources);
            AdditionalFiles.AddRange(sourceState.AdditionalFiles);
            AdditionalFilesFactories.AddRange(sourceState.AdditionalFilesFactories);
            AdditionalProjectReferences.AddRange(sourceState.AdditionalProjectReferences);
        }
Example #2
0
        public void EnumerateAdditionalFiles()
        {
            if (String.IsNullOrEmpty(RootDirectory) || !Directory.Exists(RootDirectory))
            {
                return;
            }

            var nonDyfDllFiles = Directory.EnumerateFiles(
                RootDirectory,
                "*",
                SearchOption.AllDirectories)
                                 .Where(x => !x.ToLower().EndsWith(".dyf") && !x.ToLower().EndsWith(".dll") && !x.ToLower().EndsWith("pkg.json") && !x.ToLower().EndsWith(".backup"))
                                 .Select(x => new PackageFileInfo(RootDirectory, x));

            AdditionalFiles.Clear();
            AdditionalFiles.AddRange(nonDyfDllFiles);
        }