Class: LifecycleService
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:30
This service controls the lifecycle of a Univer instance. Other modules can inject this service to read the current lifecycle stage or subscribe to lifecycle changes.
Extends
Constructors
new LifecycleService()
new LifecycleService(_logService): LifecycleService
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:36
Parameters
Parameter | Type |
---|---|
_logService | ILogService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
lifecycle$ | readonly | Observable <LifecycleStages > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:32 |
Accessors
stage
Get Signature
get stage(): LifecycleStages
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:42
Returns
Set Signature
set stage(stage): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:46
Parameters
Parameter | Type |
---|---|
stage | LifecycleStages |
Returns
void
Methods
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:57
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
subscribeWithPrevious()
subscribeWithPrevious(): Observable<LifecycleStages>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/lifecycle/lifecycle.service.ts:67
Subscribe to lifecycle changes and all previous stages and the current stage will be emitted immediately.
Returns
Observable
<LifecycleStages
>