iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIServiceContainer

@protocol ISCIServiceContainer <NSObject>

Defines the interface to a ServiceContainer used throughout SciChart.

  • Registers the service.

    Declaration

    Objective-C

    - (void)registerService:(nonnull id)service
                     ofType:(nonnull Protocol *)classType;

    Swift

    func registerService(_ service: Any, ofType classType: Protocol)

    Parameters

    service

    The service instance to register.

    classType

    The type of service.

  • Determines whether this instance has the service of specified type.

    Declaration

    Objective-C

    - (BOOL)hasServiceOfType:(nonnull Protocol *)classType;

    Swift

    func hasService(ofType classType: Protocol) -> Bool

    Parameters

    classType

    The type of service.

    Return Value

    YES - if container has specified service type, otherwise - NO.

  • Gets the esrvice instance registered by type

    Declaration

    Objective-C

    - (nonnull id)getServiceOfType:(nonnull Protocol *)classType;

    Swift

    func getServiceOfType(_ classType: Protocol) -> Any

    Parameters

    classType

    The service type to get.

    Return Value

    The service instance.

  • Deregisters service.

    Declaration

    Objective-C

    - (void)deregisterServiceOfType:(nonnull Protocol *)classType;

    Swift

    func deregisterService(ofType classType: Protocol)

    Parameters

    classType

    The type of service.