internal static DataAccessResponseType StoreTheme(ThemeTableEntity themeTableEntity)
        {
            var response = new DataAccessResponseType();

            try
            {
                TableOperation operation = TableOperation.Insert((themeTableEntity as TableEntity));
                themeTableEntity.cloudTable.Execute(operation);

                response.isSuccess = true;

                return(response);
            }
            catch (Exception e)
            {
                //Log exception and email platform admins

                /*
                 * PlatformExceptionsHelper.LogExceptionAndAlertAdmins(
                 *  e,
                 *  "attempting to store notifications into table storage for: " + userId,
                 *  System.Reflection.MethodBase.GetCurrentMethod()
                 * );
                 */

                response.isSuccess    = true;
                response.ErrorMessage = e.Message;

                return(response);
            }
        }
Esempio n. 2
0
        public static DataAccessResponseType CreateTheme(ThemeModel theme)
        {
            var themeTableEntity = new ThemeTableEntity(theme.Name);


            themeTableEntity.Font = theme.Font;

            themeTableEntity.ColorBackground               = theme.Colors.Background;
            themeTableEntity.ColorBackgroundGradientTop    = theme.Colors.BackgroundGradianetTop;
            themeTableEntity.ColorBackgroundGradientBottom = theme.Colors.BackgroundGradientBottom;
            themeTableEntity.ColorForeground               = theme.Colors.Foreground;
            themeTableEntity.ColorHighlight = theme.Colors.Highlight;
            themeTableEntity.ColorOverlay   = theme.Colors.Overlay;
            themeTableEntity.ColorShadow    = theme.Colors.Shadow;
            themeTableEntity.ColorTrim      = theme.Colors.Trim;

            return(Internal.ThemesTableManager.StoreTheme(themeTableEntity));
        }