@univerjs/core v0.4.2 • Docs
Class: ContextService
Extends
Implements
Constructors
new ContextService()
new ContextService(): ContextService
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
contextChanged$ | readonly | Observable <{}> | undefined | - | submodules/univer/packages/core/src/services/context/context.service.ts:35 (opens in a new tab) |
Methods
dispose()
dispose(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/core/src/services/context/context.service.ts:39 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getContextValue()
getContextValue(key): boolean
Parameters
Parameter | Type |
---|---|
key | string |
Returns
boolean
Implementation of
IContextService
.getContextValue
Defined in
submodules/univer/packages/core/src/services/context/context.service.ts:44 (opens in a new tab)
setContextValue()
setContextValue(key, value): void
Parameters
Parameter | Type |
---|---|
key | string |
value | boolean |
Returns
void
Implementation of
IContextService
.setContextValue
Defined in
submodules/univer/packages/core/src/services/context/context.service.ts:48 (opens in a new tab)
subscribeContextValue$()
subscribeContextValue$(key): Observable<boolean>
Parameters
Parameter | Type |
---|---|
key | string |
Returns
Observable
<boolean
>
Implementation of
IContextService
.subscribeContextValue$
Defined in
submodules/univer/packages/core/src/services/context/context.service.ts:53 (opens in a new tab)