import { IDynamicProperty } from "./abstractions"; import { ConfigurationManager } from "./configurationManager"; import { ConfigurationSourceBuilder } from "./configurationSourceBuilder"; import * as rx from 'rxjs'; /** * * Provides dynamic properties updated when config change. * Accessing a dynamic property is very fast. The last value is cached and updated on the fly * from a ConfigurationSource at fixed interval. * Updates are made using polling requests on a list of sources. *
* Dynamic properties are read only. You can set a value but it will be valid only as a default value. *
*
* DynamicConfiguration.init().addRest("http....").startPolling();
* let i:number = DynamicConfiguration.getProperty("prop1");
* let i2:number = DynamicConfiguration.getOrDefaultProperty("prop1", 1);
*
*/
export declare class DynamicConfiguration {
/**
* For test only - Do not use directly
*/
private static manager;
private static _builder;
/**
* subscribe for a global property changed
*/
static readonly propertyChanged: rx.Observable