private IEnumerable <Lazy <CodeRefactoringProvider, OrderableLanguageMetadata> > DistributeLanguages(IEnumerable <Lazy <CodeRefactoringProvider, CodeChangeProviderMetadata> > providers) { foreach (Lazy <CodeRefactoringProvider, CodeChangeProviderMetadata> provider in providers) { foreach (string language in provider.Metadata.Languages) { OrderableLanguageMetadata orderable = new OrderableLanguageMetadata(null, language); yield return(new Lazy <CodeRefactoringProvider, OrderableLanguageMetadata>(() => provider.Value, orderable)); } } }
private IEnumerable <Lazy <CodeRefactoringProvider, OrderableLanguageMetadata> > DistributeLanguages(IEnumerable <Lazy <CodeRefactoringProvider, CodeChangeProviderMetadata> > providers) { foreach (var provider in providers) { foreach (var language in provider.Metadata.Languages) { var orderable = new OrderableLanguageMetadata( provider.Metadata.Name, language, provider.Metadata.AfterTyped, provider.Metadata.BeforeTyped); yield return(new Lazy <CodeRefactoringProvider, OrderableLanguageMetadata>(() => provider.Value, orderable)); } } }