protected string GetMailPresetsAsInlineScript() { var sbScript = new StringBuilder(); var settings = MailCommonSettings.LoadForCurrentUser(); settings.CacheUnreadMessagesSetting = false; //TODO: Change cache algoritnm and restore it back sbScript .AppendFormat("ASC.Mail.Presets.Accounts = {0};\r\n", JsonConvert.SerializeObject(GetAccounts(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.Tags = {0};\r\n", JsonConvert.SerializeObject(GetTags(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.Folders = {0};\r\n", JsonConvert.SerializeObject(GetFolders(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.DisplayImagesAddresses = {0};\r\n", JsonConvert.SerializeObject(GetDisplayImagesAddresses(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.CommonSettings = {0};\r\n", JsonConvert.SerializeObject(settings, new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.UserFolders = {0};\r\n", JsonConvert.SerializeObject(GetUserFolders(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.Filters = {0};\r\n", JsonConvert.SerializeObject(GetFilters(), new HtmlEncodeStringPropertiesConverter())); return(sbScript.ToString()); }
protected string GetMailPresetsAsInlineScript() { var sbScript = new StringBuilder(); sbScript .AppendFormat("ASC.Mail.Presets.Accounts = {0};\r\n", JsonConvert.SerializeObject(GetAccounts(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.Tags = {0};\r\n", JsonConvert.SerializeObject(GetTags(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.Folders = {0};\r\n", JsonConvert.SerializeObject(GetFolders(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.DisplayImagesAddresses = {0};\r\n", JsonConvert.SerializeObject(GetDisplayImagesAddresses(), new HtmlEncodeStringPropertiesConverter())) .AppendFormat("ASC.Mail.Presets.CommonSettings = {0};\r\n", JsonConvert.SerializeObject(MailCommonSettings.LoadForCurrentUser(), new HtmlEncodeStringPropertiesConverter())); return(sbScript.ToString()); }
public MailCommonSettings GetCommonSettings() { var commonSettings = MailCommonSettings.LoadForCurrentUser(); return(commonSettings); }
public MailCommonSettings GetCommonSettings() { var commonSettings = MailCommonSettings.GetSettings(); return(commonSettings); }