Interface IServiceCollection
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- nanoFramework.DependencyInjection.dll
Default implementation of IServiceCollection.
public interface IServiceCollection
- Extension Methods
Properties
Count
Gets the number of elements contained in the collection.
int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the collection is read-only.
bool IsReadOnly { get; }
Property Value
this[int]
Gets or sets the ServiceDescriptor at the specified index.
ServiceDescriptor this[int index] { get; set; }
Parameters
index
intThe zero-based index of the item to add.
Property Value
Methods
Add(ServiceDescriptor)
Adds an item to the collection.
int Add(ServiceDescriptor item)
Parameters
item
ServiceDescriptorThe ServiceDescriptor to add.
Returns
Clear()
Removes all ServiceDescriptor from the collection.
void Clear()
Contains(ServiceDescriptor)
Determines whether the collection contains a specific value.
bool Contains(ServiceDescriptor item)
Parameters
item
ServiceDescriptorThe ServiceDescriptor to locate in the collection.
Returns
CopyTo(ServiceDescriptor[], int)
Copies the elements of the collection to an Array starting at a particular Array index.
void CopyTo(ServiceDescriptor[] array, int arrayIndex)
Parameters
array
ServiceDescriptor[]The one-dimensional Array that is the destination of the elements copied from. The Array must have zero-based indexing.
arrayIndex
intThe zero-based index in array at which copying begins.
GetEnumerator()
Returns an enumerator that iterates through a collection.
IEnumerator GetEnumerator()
Returns
IndexOf(ServiceDescriptor)
Determines the index of a specific item in the collection.
int IndexOf(ServiceDescriptor item)
Parameters
item
ServiceDescriptorThe ServiceDescriptor to get the index of.
Returns
Insert(int, ServiceDescriptor)
Inserts an item to the collection at the specified index.
void Insert(int index, ServiceDescriptor item)
Parameters
index
intThe zero-based index at which ServiceDescriptor should be inserted.
item
ServiceDescriptorThe ServiceDescriptor to insert.
Remove(ServiceDescriptor)
Removes the first occurrence of a specific object from the collection.
void Remove(ServiceDescriptor item)
Parameters
item
ServiceDescriptorThe ServiceDescriptor to remove.
RemoveAt(int)
Removes the ServiceDescriptor item at the specified index.
void RemoveAt(int index)
Parameters
index
intThe zero-based index of the item to remove.