Method | Description | |
---|---|---|
Configure ( object target ) : TrackingConfiguration |
Gets or creates a configuration object what will control how the target object is going to be tracked (which properties, when to persist, when to apply, validation). For a given target object, always returns the same configuration instance.
|
|
RegisterConfigurationInitializer ( IConfigurationInitializer cfgInitializer ) : void |
Registers an object that will initialize the configuration for all instances of a type. Only the most specific initialier will be used (for the most derived type). E.g. if there are initializers for types Window and Object, and a window is being tracked, only the Window initializer will be used. |
|
RunAutoPersist ( ) : void |
Runs a global persist for all objects that are still alive and have AutoPersistEnabled=true in their TrackingConfiguration.
|
|
StateTracker ( ) : System |
Creates a StateTracker that uses json files in a per-user folder to store the data. Does a global persist when it detects the desktop application is closing. This constructor is appropriate for most desktop application use cases. Both ObjectStoreFactory and AutoPersistTrigger properties can be set/modified. |
|
StateTracker ( IStoreFactory storeFactory, ITriggerPersist persistTrigger ) : System |
Creates a new instance of the state tracker with the specified storage mechanism, and global persist trigger. Even though both arguments can be set via properties, this constructor is here to make the dependencies explicit. |
Method | Description | |
---|---|---|
AutoPersistTrigger_PersistRequired ( object sender, |
public Configure ( object target ) : TrackingConfiguration | ||
target | object | The object whose properties your want to track. |
return | TrackingConfiguration |
public RegisterConfigurationInitializer ( IConfigurationInitializer cfgInitializer ) : void | ||
cfgInitializer | IConfigurationInitializer | The configuration initializer to register. |
return | void |
public StateTracker ( IStoreFactory storeFactory, ITriggerPersist persistTrigger ) : System | ||
storeFactory | IStoreFactory | The factory that will create an IStore for each tracked object's data. |
persistTrigger | ITriggerPersist | The object that will notify the state tracker when it should run a global persist operation. This will usually be when the application is shutting down. |
return | System |