コード例 #1
0
        private async Task <List <string> > GetSatelliteFilesForLibraryAsync(FrameworkSpecificGroup libraryFrameworkSpecificGroup, PackageReaderBase packageReader,
                                                                             CancellationToken cancellationToken)
        {
            var satelliteFiles = new List <string>();

            using (var nuspec = await packageReader.GetNuspecAsync(cancellationToken))
            {
                var nuspecReader = new NuspecReader(nuspec);

                var satelliteFilesInGroup = libraryFrameworkSpecificGroup.Items
                                            .Where(item => Path.GetDirectoryName(item)
                                                   .Split(Path.DirectorySeparatorChar)
                                                   .Contains(nuspecReader.GetLanguage(), StringComparer.OrdinalIgnoreCase)).ToList();

                satelliteFiles.AddRange(satelliteFilesInGroup);

                return(satelliteFiles);
            }
        }