Show / Hide Table of Contents

    Interface IServiceProvider

    Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.

    Namespace: System
    Assembly: nanoFramework.DependencyInjection.dll
    Syntax
    public interface IServiceProvider

    Methods

    | Improve this Doc View Source

    GetService(Type)

    Gets the service object of the specified type.

    Declaration
    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.

    | Improve this Doc View Source

    GetService(Type[])

    Gets the service objects of the specified type.

    Declaration
    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.

    Extension Methods

    ServiceProviderServiceExtensions.GetServices(IServiceProvider, Type)
    ServiceProviderServiceExtensions.GetServices(IServiceProvider, Type[])
    ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider, Type)
    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX