Overview
Specialized property observers for Date property paths (year/month/day/utc variants and time).
API Reference
Class exported from property-observer/factories/date-property.
import { DatePropertyObserverManager } from '@rs-x/state-manager';import { InjectionContainer } from '@rs-x/core';
import {
RsXStateManagerInjectionTokens,
RsXStateManagerModule,
type IDatePropertyObserverManager,
} from '@rs-x/state-manager';
await InjectionContainer.load(RsXStateManagerModule);
// Resolve from DI container (do not construct this service directly).
const datePropertyObserverManager = InjectionContainer.get<IDatePropertyObserverManager>(
RsXStateManagerInjectionTokens.IDatePropertyObserverManager,
);
console.log(datePropertyObserverManager);import { Inject } from '@rs-x/core';
import {
RsXStateManagerInjectionTokens,
type IDatePropertyObserverManager,
} from '@rs-x/state-manager';
class MyConsumer {
constructor(
@Inject(RsXStateManagerInjectionTokens.IDatePropertyObserverManager)
private readonly dependency: IDatePropertyObserverManager,
) {}
}5 members in this class.
constructor(
@Inject(RsXStateManagerInjectionTokens.IDateProxyFactory) private readonly _dateProxyFactory: IDateProxyFactory,
@Inject(RsXCoreInjectionTokens.IErrorLog) private readonly _errorLog: IErrorLog,
@Inject(RsXCoreInjectionTokens.IDatePropertyAccessor) private readonly _datePropertyAccessor: IDatePropertyAccessor,
@Inject(RsXStateManagerInjectionTokens.IIndexWatchRuleFactory) private readonly _indexWatchRuleFactory: IIndexWatchRuleFactory
)Parameters
| Name | Type | Required |
|---|---|---|
| _dateProxyFactory | IDateProxyFactory | required |
| _errorLog | IErrorLog | required |
| _datePropertyAccessor | IDatePropertyAccessor | required |
| _indexWatchRuleFactory | IIndexWatchRuleFactory | required |
public override createId(date: Date): DateParameters
| Name | Type | Required |
|---|---|---|
| date | Date | required |
Returns
Date
public override getId(date: Date): DateParameters
| Name | Type | Required |
|---|---|---|
| date | Date | required |
Returns
Date
protected override createInstance(date: Date): IProperForDataObserverManagerParameters
| Name | Type | Required |
|---|---|---|
| date | Date | required |
protected override releaseInstance( properForDataObserverManager: IProperForDataObserverManager): voidParameters
| Name | Type | Required |
|---|---|---|
| properForDataObserverManager | IProperForDataObserverManager | required |
Returns
void