ISettingsSystem

From Virtual World Web Wiki
Jump to: navigation, search

The settings system is a primary layer one interface. It provides methods for getting and setting component settings as well as registering admin configurable settings and some helpful system properties.

Remarks [edit]

Properties

Uri ResourceBaseUri {get;}
The base http:// URI of the resource system (mostly obsolete at this point since the web-based resource system isn't in use anymore). It it the base for res:// resource URIs
Uri ServiceBaseUri {get;}
The base URI of the service provider's web-based APIs
Guid ServiceProviderID {get;}
The service provider's unique ID with
Uri WorldBaseUri {get;}
The base vww:// URI of this service provider

Methods

void ConfigureSetting(string name, string identifier, bool userEditable, SettingDataType dataType, object defaultValue = NULL)
Describes a component setting so it can (optionally) be edited in the admin. You can provide a translation identifier for display of the name, and a data type as a hint for the admin editor, as well as a default value.
bool ContainsKey(string name)
Checks to see if a given setting exists
bool ContainsSystemKey(string name)
Checks to see if a given system setting exists
TRet? GetNullableValue<TRet>(string name)
Gets the value of a component setting, as a nullable value
TRet GetOrCreateValue<TRet>(string name, Func<TRet> createFactory)
Gets the value of a component setting, creating it if it doesn't exist
object GetSystemValue(string name)
Gets the value of a system setting
TRet GetSystemValue<TRet>(string name)
Gets the value of a system setting
object GetValue(string name)
Gets the value of a component setting
TRet GetValue<TRet>(string name)
Gets the value of a component setting
TRet GetValue<TRet>(string name, TRet defaultValue)
Gets the value of a component setting, with a default
void SetValue(string name, object value)
Sets the value of a component setting
bool TryGetValue<T>(string name, out T retVal)
bool UpdateFromValue<TRet>(string name, TRet defaultValue, out TRet value)