/// <summary> /// Saves the XML document. /// </summary> /// <param name="doc">The doc.</param> /// <param name="zone">The zone to save the Xml Document for.</param> private void SaveXmlDocument(XmlDocument doc, string zone) { WidgetSettings ws = new WidgetSettings(zone); ws.SettingsBehavior = new XMLDocumentBehavior(); ws.SaveSettings(doc); Cache[zone] = doc; }
/// <summary> /// Saves the XML document. /// </summary> /// <param name="doc">The doc.</param> private void SaveXmlDocument(XmlDocument doc) { WidgetSettings ws = new WidgetSettings(_zoneId); ws.SettingsBehavior = new XMLDocumentBehavior(); ws.SaveSettings(doc); Cache[_zoneId] = doc; }
/// <summary> /// Saves settings to data store /// </summary> /// <param name="settings">Settings</param> protected virtual void SaveSettings(StringDictionary settings) { string cacheId = "be_widget_" + WidgetID; WidgetSettings ws = new WidgetSettings(WidgetID.ToString()); ws.SaveSettings(settings); Cache[cacheId] = settings; }
/// <summary> /// Saves widget settings into datastore /// </summary> /// <param name="settings">Settings object (key/values)</param> /// <param name="widgetId">Widget Id</param> public static void SaveSettings(StringDictionary settings, string widgetId) { var cacheId = $"be_widget_{widgetId}"; var ws = new WidgetSettings(widgetId); ws.SaveSettings(settings); Blog.CurrentInstance.Cache[cacheId] = settings; }
private void SaveXmlDocument(XmlDocument doc, string zone) { var ws = new WidgetSettings(zone) { SettingsBehavior = new XmlDocumentBehavior() }; ws.SaveSettings(doc); Blog.CurrentInstance.Cache[zone] = doc; }
/// <summary> /// Saves settings to data store /// </summary> /// <param name="settings"> /// The settings /// </param> protected virtual void SaveSettings(StringDictionary settings) { var cacheId = string.Format("be_widget_{0}", WidgetId); var ws = new WidgetSettings(WidgetId.ToString()); ws.SaveSettings(settings); Blog.CurrentInstance.Cache[cacheId] = settings; }
/// <summary> /// Saves settings to data store /// </summary> /// <param name="settings"> /// The settings /// </param> protected virtual void SaveSettings(StringDictionary settings) { var cacheId = string.Format("be_widget_{0}", this.WidgetId); var ws = new WidgetSettings(this.WidgetId.ToString()); ws.SaveSettings(settings); this.Cache[cacheId] = settings; }