Esempio n. 1
0
        public ThemeManager(string owaVersion)
        {
            this.owaVersion       = owaVersion;
            this.storageIdToIdMap = new Dictionary <string, uint>(StringComparer.OrdinalIgnoreCase);
            string path = Path.Combine(new string[]
            {
                FolderConfiguration.Instance.RootPath,
                ResourcePathBuilderUtilities.GetResourcesRelativeFolderPath(owaVersion),
                "resources",
                "styles",
                "0"
            });

            this.shouldSkipThemeFolder = Directory.Exists(path);
        }
Esempio n. 2
0
        protected override ThemeSelectionInfoType InternalExecute()
        {
            ISet <string> set         = new HashSet <string>();
            UserContext   userContext = UserContextManager.GetUserContext(HttpContext.Current);
            IEnumerable <ThemeStyleResource> userMouseThemedResources = this.GetUserMouseThemedResources(userContext);

            foreach (ThemeStyleResource themeStyleResource in userMouseThemedResources)
            {
                string item = Globals.FormatURIForCDN(themeStyleResource.StyleDirectory) + themeStyleResource.ResourceName;
                set.Add(item);
            }
            string currentOwaVersion = userContext.CurrentOwaVersion;

            return(new ThemeSelectionInfoType
            {
                Themes = ThemeManagerFactory.GetInstance(currentOwaVersion).Themes,
                CssPaths = set.Distinct <string>().ToArray <string>(),
                ThemePath = ResourcePathBuilderUtilities.GetThemeResourcesRelativeFolderPath(ResourcePathBuilderUtilities.GetResourcesRelativeFolderPath(currentOwaVersion))
            });
        }
Esempio n. 3
0
        public ClientWatsonParameters(string owaVersion)
        {
            this.symbolsFolderPath          = AppConfigLoader.GetConfigStringValue("ClientWatsonSymbolsFolderPath", Path.Combine(ExchangeSetupContext.InstallPath, string.Format("ClientAccess\\Owa\\{0}\\ScriptSymbols", ResourcePathBuilderUtilities.GetResourcesRelativeFolderPath(owaVersion))));
            this.maxNumberOfWatsonsPerError = AppConfigLoader.GetConfigIntValue("ClientWatsonMaxReportsPerError", 1, int.MaxValue, 5);
            TimeSpan configTimeSpanValue = AppConfigLoader.GetConfigTimeSpanValue("ClientWatsonResetErrorCountInterval", TimeSpan.FromSeconds(1.0), TimeSpan.FromDays(1.0), TimeSpan.FromHours(1.0));

            this.resetErrorsReportedTimer = new Timer(delegate(object param0)
            {
                this.clientErrorsReported = new ConcurrentDictionary <int, int>();
            }, null, configTimeSpanValue, configTimeSpanValue);
            Version installedVersion = ExchangeSetupContext.InstalledVersion;

            this.ExchangeSourcesPath = string.Format("\\\\exsrc\\SOURCES\\ALL\\{0:D2}.{1:D2}.{2:D4}.{3:D3}\\", new object[]
            {
                installedVersion.Major,
                installedVersion.Minor,
                installedVersion.Build,
                installedVersion.Revision
            });
            this.owaVersion = owaVersion;
        }