Interface IConfigStore
A storage for a config structure.
Namespace: IPA.Config
Assembly: IPA.Loader.dll
Syntax
public interface IConfigStore
Properties
| Improve this Doc View SourceSyncObject
A synchronization object for the save thread to wait on for changes. It should be signaled whenever the internal state of the object is changed. The writer will never signal this handle.
Declaration
WaitHandle SyncObject { get; }
Property Value
Type | Description |
---|---|
WaitHandle |
WriteSyncObject
A synchronization object for the load thread and accessors to maintain safe synchronization. Any readers should take a read lock with EnterReadLock() or EnterUpgradeableReadLock(), and any writers should take a write lock with EnterWriteLock().
Declaration
ReaderWriterLockSlim WriteSyncObject { get; }
Property Value
Type | Description |
---|---|
ReaderWriterLockSlim |
Remarks
Read and write are read and write to this object, not to the file on disk.
Methods
| Improve this Doc View SourceReadFrom(ConfigProvider)
Reads the config structure from the given IConfigProvider into the current IConfigStore.
Declaration
void ReadFrom(ConfigProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ConfigProvider | provider | the provider to read from |
Remarks
The calling code will have entered a write lock on WriteSyncObject when this is called.
WriteTo(ConfigProvider)
Writes the config structure stored by the current IConfigStore to the given IConfigProvider.
Declaration
void WriteTo(ConfigProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ConfigProvider | provider | the provider to write to |
Remarks
The calling code will have entered a read lock on WriteSyncObject when this is called.