Search Results for

    Show / Hide Table of Contents

    Interface IServiceCollection

    Default implementation of IServiceCollection.

    Namespace: nanoFramework.DependencyInjection
    Assembly: nanoFramework.DependencyInjection.dll
    Syntax
    public interface IServiceCollection

    Properties

    Count

    Gets the number of elements contained in the collection.

    Declaration
    int Count { get; }
    Property Value
    Type Description
    int

    IsReadOnly

    Gets a value indicating whether the collection is read-only.

    Declaration
    bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    this[int]

    Gets or sets the ServiceDescriptor at the specified index.

    Declaration
    ServiceDescriptor this[int index] { get; set; }
    Parameters
    Type Name Description
    int index

    The zero-based index of the item to add.

    Property Value
    Type Description
    ServiceDescriptor

    Methods

    Add(ServiceDescriptor)

    Adds an item to the collection.

    Declaration
    int Add(ServiceDescriptor item)
    Parameters
    Type Name Description
    ServiceDescriptor item

    The ServiceDescriptor to add.

    Returns
    Type Description
    int

    Clear()

    Removes all ServiceDescriptor from the collection.

    Declaration
    void Clear()

    Contains(ServiceDescriptor)

    Determines whether the collection contains a specific value.

    Declaration
    bool Contains(ServiceDescriptor item)
    Parameters
    Type Name Description
    ServiceDescriptor item

    The ServiceDescriptor to locate in the collection.

    Returns
    Type Description
    bool

    CopyTo(ServiceDescriptor[], int)

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

    Declaration
    void CopyTo(ServiceDescriptor[] array, int arrayIndex)
    Parameters
    Type Name Description
    ServiceDescriptor[] array

    The one-dimensional Array that is the destination of the elements copied from. The Array must have zero-based indexing.

    int arrayIndex

    The zero-based index in array at which copying begins.

    GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    IEnumerator GetEnumerator()
    Returns
    Type Description
    IEnumerator

    IndexOf(ServiceDescriptor)

    Determines the index of a specific item in the collection.

    Declaration
    int IndexOf(ServiceDescriptor item)
    Parameters
    Type Name Description
    ServiceDescriptor item

    The ServiceDescriptor to get the index of.

    Returns
    Type Description
    int

    Insert(int, ServiceDescriptor)

    Inserts an item to the collection at the specified index.

    Declaration
    void Insert(int index, ServiceDescriptor item)
    Parameters
    Type Name Description
    int index

    The zero-based index at which ServiceDescriptor should be inserted.

    ServiceDescriptor item

    The ServiceDescriptor to insert.

    Remove(ServiceDescriptor)

    Removes the first occurrence of a specific object from the collection.

    Declaration
    void Remove(ServiceDescriptor item)
    Parameters
    Type Name Description
    ServiceDescriptor item

    The ServiceDescriptor to remove.

    RemoveAt(int)

    Removes the ServiceDescriptor item at the specified index.

    Declaration
    void RemoveAt(int index)
    Parameters
    Type Name Description
    int index

    The zero-based index of the item to remove.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection)
    ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection, ServiceProviderOptions)
    ServiceCollectionServiceExtensions.AddScoped(IServiceCollection, Type)
    ServiceCollectionServiceExtensions.AddScoped(IServiceCollection, Type, Type)
    ServiceCollectionServiceExtensions.AddSingleton(IServiceCollection, Type)
    ServiceCollectionServiceExtensions.AddSingleton(IServiceCollection, Type, object)
    ServiceCollectionServiceExtensions.AddSingleton(IServiceCollection, Type, Type)
    ServiceCollectionServiceExtensions.AddTransient(IServiceCollection, Type)
    ServiceCollectionServiceExtensions.AddTransient(IServiceCollection, Type, Type)
    ServiceCollectionServiceExtensions.RemoveAll(IServiceCollection, Type)
    ServiceCollectionServiceExtensions.Replace(IServiceCollection, ServiceDescriptor)
    ServiceCollectionServiceExtensions.TryAdd(IServiceCollection, ServiceDescriptor)
    ServiceCollectionServiceExtensions.TryAddEnumerable(IServiceCollection, IEnumerable)
    ServiceCollectionServiceExtensions.TryAddEnumerable(IServiceCollection, ServiceDescriptor)
    In this article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX