IGuardedOperations.FindEligibleFactories<TExtensionFactory,TMetadataView>(IEnumerable<Lazy<TExtensionFactory,TMetadataView>>, IContentType, IContentTypeRegistryService) Метод
Определение
Выбирает фабрики расширений, объявленные метаданные типа содержимого которых соответствуют указанному целевому типу содержимого, принимая во внимание, что фабрика расширений может быть отключена атрибутом Replace в другой фабрике.Selects extension factories whose declared content type metadata matches the provided target content type, taking into account that extension factory may be disabled by a Replace attribute on another factory.
public:
generic <typename TExtensionFactory, typename TMetadataView>
where TExtensionFactory : class where TMetadataView : Microsoft::VisualStudio::Utilities::INamedContentTypeMetadata System::Collections::Generic::IEnumerable<Lazy<TExtensionFactory, TMetadataView> ^> ^ FindEligibleFactories(System::Collections::Generic::IEnumerable<Lazy<TExtensionFactory, TMetadataView> ^> ^ lazyFactories, Microsoft::VisualStudio::Utilities::IContentType ^ dataContentType, Microsoft::VisualStudio::Utilities::IContentTypeRegistryService ^ contentTypeRegistryService);
public System.Collections.Generic.IEnumerable<Lazy<TExtensionFactory,TMetadataView>> FindEligibleFactories<TExtensionFactory,TMetadataView> (System.Collections.Generic.IEnumerable<Lazy<TExtensionFactory,TMetadataView>> lazyFactories, Microsoft.VisualStudio.Utilities.IContentType dataContentType, Microsoft.VisualStudio.Utilities.IContentTypeRegistryService contentTypeRegistryService) where TExtensionFactory : class where TMetadataView : Microsoft.VisualStudio.Utilities.INamedContentTypeMetadata;
abstract member FindEligibleFactories : seq<Lazy<'ExtensionFactory, 'MetadataView>> * Microsoft.VisualStudio.Utilities.IContentType * Microsoft.VisualStudio.Utilities.IContentTypeRegistryService -> seq<Lazy<'ExtensionFactory, 'MetadataView>> (requires 'ExtensionFactory : null and 'MetadataView :> Microsoft.VisualStudio.Utilities.INamedContentTypeMetadata)
Public Function FindEligibleFactories(Of TExtensionFactory As Class, TMetadataView As Class) (lazyFactories As IEnumerable(Of Lazy(Of TExtensionFactory, TMetadataView)), dataContentType As IContentType, contentTypeRegistryService As IContentTypeRegistryService) As IEnumerable(Of Lazy(Of TExtensionFactory, TMetadataView))
Параметры типа
- TExtensionFactory
- TMetadataView
Параметры
- lazyFactories
- IEnumerable<Lazy<TExtensionFactory,TMetadataView>>
Отложенные ссылки, которые будут вычисляться.Lazy references that will be evaluated.
- dataContentType
- IContentType
Тип целевого содержимого.Target content type.
- contentTypeRegistryService
- IContentTypeRegistryService
Экземпляр IContentTypeRegistryService , в котором упорядочиваются типы содержимого.Instance of IContentTypeRegistryService which orders content types.
Возвращаемое значение
- IEnumerable<Lazy<TExtensionFactory,TMetadataView>>
Комментарии
Этот класс поддерживает инфраструктуру Visual Studio и в целом не предназначен для непосредственного использования из кода.This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.