Search Results for

    Show / Hide Table of Contents

    Class ServiceProvider

    The default IServiceProvider.

    Inheritance
    object
    ServiceProvider
    Implements
    IServiceProvider
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: nanoFramework.DependencyInjection
    Assembly: nanoFramework.DependencyInjection.dll
    Syntax
    public sealed class ServiceProvider : IServiceProvider, IDisposable

    Methods

    CreateScope()

    Declaration
    public IServiceScope CreateScope()
    Returns
    Type Description
    IServiceScope
    Exceptions
    Type Condition
    AggregateException

    Some services are not able to be constructed.

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    Exceptions
    Type Condition
    AggregateException

    Some services are not able to be constructed.

    GetService(Type)

    Gets the service object of the specified type.

    Declaration
    public object GetService(Type serviceType)
    Parameters
    Type Name Description
    Type serviceType

    An object that specifies the type of service object to get.

    Returns
    Type Description
    object

    A service object of type serviceType. -or- null if there is no service object of type serviceType.

    Exceptions
    Type Condition
    AggregateException

    Some services are not able to be constructed.

    GetService(Type[])

    Gets the service objects of the specified type.

    Declaration
    public object[] GetService(Type[] serviceType)
    Parameters
    Type Name Description
    Type[] serviceType

    An array object that specifies the type of service object to get.

    Returns
    Type Description
    object[]

    A service object array of type serviceType. -or- array empty if there is no service object of type serviceType.

    Exceptions
    Type Condition
    AggregateException

    Some services are not able to be constructed.

    Implements

    IServiceProvider
    IDisposable

    Extension Methods

    ServiceProviderServiceExtensions.CreateScope(IServiceProvider)
    ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider, Type)
    ServiceProviderServiceExtensions.GetServices(IServiceProvider, Type)
    ServiceProviderServiceExtensions.GetServices(IServiceProvider, Type[])
    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)
    In this article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX