public IEnumerable <TPlugin> this[Type key] { get { return(_pluginsWithMedata .Where(pm => pm.Item2.Any(metadata => metadata.Key == MefProvider.Implements && (Type)metadata.Value == key)) .Select(pm => pm.Item1) .ToArray()); } }
#pragma warning disable CA1043 // Use Integral Or String Argument For Indexers. This indexer implements 'Autofac.Features.Indexed.IIndex', for macro concepts that are directly indexed by concept type. public IEnumerable <TPlugin> this[Type key] => _pluginsWithMedata .Where(pm => pm.Metadata.Any(metadata => metadata.Key == MefProvider.Implements && (Type)metadata.Value == key)) .Select(pm => pm.Plugin) .ToArray();