src/Microsoft/DependencyInjection/0.Abstractions/src/Extensions/StaticLifetimeServicesExtension{`4}.cs
/// <summary>
/// Adds <paramref name="descriptors"/> if not a single descriptor with same
/// service type and same implementation does exist in <paramref name="collection"/>.
/// </summary>
/// <param name="collection"></param>
/// <param name="descriptors"></param>
/// <remarks>
/// Prevents the registration of implementation type duplicates.
/// </remarks>
Adds  if not a single descriptor with same
service type and same implementation does exist in .
Adds if not a single descriptor with same service type and same implementation does exist in .
public void TryAddEnumerable(TCollection collection, IEnumerable<TDescriptor> descriptors)
        {
            foreach (var descriptor in descriptors) {
                TryAddEnumerable(collection, descriptor);
            }
        }
public void TryAddEnumerable ( TCollection collection , IEnumerable < TDescriptor > descriptors ) { foreach ( var descriptor in descriptors ) { TryAddEnumerable ( collection , descriptor ) ; } }
Adds  if not a single descriptor with same
service type and same implementation does exist in .
Adds if not a single descriptor with same service type and same implementation does exist in .
collection
TCollection
None
descriptors
IEnumerable<TDescriptor>
None
remarks
Prevents the registration of implementation type duplicates.
Prevents the registration of implementation type duplicates .