Microsoft.Extensions.DependencyInjection.Abstractions by Microsoft

<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0-preview.1.24080.9" />

 ServiceCollection

Default implementation of IServiceCollection.
public int Count { get; }

Gets the number of elements contained in the .

public bool IsReadOnly { get; }

Gets a value indicating whether the is read-only.

public ServiceDescriptor this[int index] { get; set; }

Gets or sets the element at the specified index.

Initializes a new instance of the ServiceCollection class.

public void Clear()

Removes all items from the .

public bool Contains(ServiceDescriptor item)

Determines whether the contains a specific value.

public void CopyTo(ServiceDescriptor[] array, int arrayIndex)

Copies the elements of the to an , starting at a particular index.

Returns an enumerator that iterates through the collection.

public int IndexOf(ServiceDescriptor item)

Determines the index of a specific item in the .

public void Insert(int index, ServiceDescriptor item)

Inserts an item to the at the specified index.

public void MakeReadOnly()

Makes this collection read-only.

public bool Remove(ServiceDescriptor item)

Removes the first occurrence of a specific object from the .

public void RemoveAt(int index)

Removes the item at the specified index.