예제 #1
0
        // Same as AddDirectory, but only look at files that don't have a culture
        internal void AddResourcesDirectory([NotNull] string directoryName)
        {
            DirectoryInfo directory = new DirectoryInfo(directoryName);

            if (!directory.Exists)
            {
                return;
            }

            AddObject(directoryName);

            // Go through all the files in the directory
            foreach (DirectoryInfo directoryInfo in directory.GetDirectories())
            {
                AddResourcesDirectory(directoryInfo.FullName);
            }

            foreach (FileInfo fileInfo in directory.GetFiles())
            {
                // Ignore the file if it has a culture, since only neutral files
                // need to re-trigger compilation (VSWhidbey 359029)
                string fullPath = fileInfo.FullName;

                if (CultureInfoHelper.GetNameFromFileName(fullPath) == null)
                {
                    AddExistingFile(fullPath);
                }
            }

            AddDateTime(directory.CreationTimeUtc);
        }