public ServiceDescriptorsBuilder AddTypesConvention(ITypeSelectionConvention selectionConvention) { if (selectionConvention == null) { throw new ArgumentNullException(nameof(selectionConvention)); } _typesConventions.Add(selectionConvention); return this; }
public ServiceDescriptorsBuilder AddTypesConvention(ITypeSelectionConvention selectionConvention) { if (selectionConvention == null) { throw new ArgumentNullException(nameof(selectionConvention)); } _typesConventions.Add(selectionConvention); return(this); }
private static IEnumerable<Type> GetTypesToRegistration(IEnumerable<Type> potentialTypesToRegister, ITypeSelectionConvention convention) { try { var typesToregistration = potentialTypesToRegister.AsParallel().Where(convention.DoesPostSelect); return typesToregistration.ToList(); } catch (AggregateException e) { throw e.FlattenTryBubbleUp(); } }
private static IEnumerable <Type> GetTypesToRegistration(IEnumerable <Type> potentialTypesToRegister, ITypeSelectionConvention convention) { try { var typesToregistration = potentialTypesToRegister.AsParallel().Where(convention.DoesPostSelect); return(typesToregistration.ToList()); } catch (AggregateException e) { throw e.FlattenTryBubbleUp(); } }