Show / Hide Table of Contents

# Interface IConfigStore

A storage for a config structure.

###### Namespace: IPA.Config

###### Assembly: IPA.Loader.dll

##### Syntax

    public interface IConfigStore

### Properties

| Improve this Doc View Source

#### SyncObject

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 |

| Improve this Doc View Source

#### 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 Source

#### ReadFrom(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.

| Improve this Doc View Source

#### 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.

### Extension Methods

ReflectionUtil.SetField<T, U>(T, String, U)
ReflectionUtil.GetField<U, T>(T, String)
ReflectionUtil.SetProperty<T, U>(T, String, U)
ReflectionUtil.GetProperty<U, T>(T, String)
ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])