Interface IConfigKeySessionShare<TKey, TShared>
- Namespace
- MonkeyLoader.Resonite.Configuration
- Assembly
- MonkeyLoader.Resonite.Integration.dll
Defines the interface for config key components, which make the key's local value available as a shared resource in Resonite FrooxEngine.Worlds, and optionally allow writing back changes from the FrooxEngine.World to the config item.
public interface IConfigKeySessionShare<TKey, TShared> : IConfigKeyComponent<IDefiningConfigKey<TKey>>, IComponent<IDefiningConfigKey<TKey>>, IConfigKeySessionShare
Type Parameters
TKey
The type of the config item's value.
TShared
The type of the resource shared in Resonite FrooxEngine.Worlds.
- Inherited Members
Properties
ConfigKey
Gets the shared config item.
IDefiningConfigKey<TKey> ConfigKey { get; }
Property Value
- IDefiningConfigKey<TKey>
DefaultValue
Gets or sets the default value for the shared config item for users that don't have it themselves.
TShared? DefaultValue { get; set; }
Property Value
- TShared
Methods
ConvertToKey(TShared?)
Converts the given value from the shared resource's type to the config item's.
TKey? ConvertToKey(TShared? sharedValue)
Parameters
sharedValue
TSharedThe value suitable for the shared resource to be converted.
Returns
- TKey
The value converted to the config item's type.
Remarks
May throw when the provided input isn't compatible.
ConvertToShared(TKey?)
Converts the given value from the config item's type to the shared resource's.
TShared? ConvertToShared(TKey? keyValue)
Parameters
keyValue
TKeyThe value suitable for the config item to be converted.
Returns
- TShared
The value converted to the shared resource's type.
Remarks
May throw when the provided input isn't compatible.