public object Load(string settingsTypeName) { Type settingsType = SettingsSerializer.GetSettingsType(settingsTypeName); ISettingsManager settingsManager = ServiceRegistration.Get <ISettingsManager>(); return(settingsManager.Load(settingsType)); }
private UPnPError OnLoad(DvAction action, IList <object> inParams, out IList <object> outParams, CallContext context) { string settingsTypeName = (string)inParams[0]; object result = Load(settingsTypeName); string serialized = SettingsSerializer.Serialize(result); outParams = new List <object> { serialized }; return(null); }
public void Save(string settingsTypeName, string settings) { object settingsObject = SettingsSerializer.Deserialize(settingsTypeName, settings); if (settingsObject == null) { return; } ISettingsManager settingsManager = ServiceRegistration.Get <ISettingsManager>(); settingsManager.Save(settingsObject); }