ABB Ability™ History UI SDK - Client API Reference
    Preparing search index...

    A component instance

    interface IComponent {
        DisposeEvent: IManualEvent<void>;
        Events: IEvents;
        get CanDispose(): boolean;
        set CanDispose(value: boolean): void;
        Abortable<TArgs extends unknown[] = []>(
            func: TAsyncAbortable<TArgs>,
            disposeonly?: boolean,
        ): TAsyncAbortableReturn<TArgs>;
        AddDisposeHandler(disposer: () => void): void;
        AutoDispose(disposables: IDisposable | IDisposable[]): void;
        Dispose(): void;
        GetComponentClass(): string;
        IsDisposed(): boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    DisposeEvent: IManualEvent<void>

    Dispose Event signaled when the object is being disposed. NOTE: Inheriting classes should use AddDisposeHandler instead.

    Events: IEvents

    cClassBase event API

    Accessors

    • get CanDispose(): boolean

      The object can be disposed

      Returns boolean

    • set CanDispose(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    Methods

    • Create function that can abort asynchronous code in case the function is called again or the owner instance have been disposed. This is useful with problematic cases where for example server request is sent and the return is handled asynchronously (with a callback). Meanwhile the configuration may have changed making the code in the callback unnecessary or even harmful. *

      Type Parameters

      • TArgs extends unknown[] = []

      Parameters

      • func: TAsyncAbortable<TArgs>

        A function with first parameter as function to check the abort state: Can be used in the function: if(abort()) return; //abort

      • disposeonly: boolean = false

        Check only the dispose state - don't check subsequent calls to the function.

      Returns TAsyncAbortableReturn<TArgs>

    • Add a dispose handler called when this object is being disposed. The dispose handlers are called in reverse order (the latest first).

      Parameters

      • disposer: () => void

        The dispose handler - should make any manual clean up necessary when the object is being disposed.

      Returns void

    • Disposes the class object.

      Returns void

    • Get the current component class name

      Returns string

    • Gets the dispose state of the current class object.

      Returns boolean

      True, if the component is disposed.