// Token: 0x0600286B RID: 10347 RVA: 0x000958E8 File Offset: 0x00093AE8 internal static Slab CreateUserBootSlab(SlabManifestType manifestType, LayoutType layout, string owaVersion) { BootSlabDefinition bootSlabDefinition = SlabManifestCollectionFactory.GetInstance(owaVersion).GetSlabManifest(manifestType, layout).GetBootSlabDefinition(); UserContext userContext = (manifestType == SlabManifestType.Anonymous || manifestType == SlabManifestType.GenericMail) ? null : UserContextManager.GetUserContext(HttpContext.Current); string[] enabledFeatures = UserResourcesFinder.GetEnabledFeatures(manifestType, userContext); return(bootSlabDefinition.GetSlab(enabledFeatures, layout)); }
// Token: 0x06002873 RID: 10355 RVA: 0x00095B7B File Offset: 0x00093D7B private static HashSet <string> GetEnabledFlightedFeatures(SlabManifestType type, IUserContext userContext, FlightedFeatureScope scope) { if (type == SlabManifestType.GenericMail || type == SlabManifestType.Anonymous) { return(new HashSet <string>()); } return(userContext.FeaturesManager.GetEnabledFlightedFeatures(scope)); }
// Token: 0x06002872 RID: 10354 RVA: 0x00095B54 File Offset: 0x00093D54 private static string[] GetEnabledFeatures(SlabManifestType type, UserContext userContext) { if (type == SlabManifestType.GenericMail || type == SlabManifestType.Anonymous || userContext == null) { return(new string[0]); } return(userContext.FeaturesManager.GetClientEnabledFeatures()); }
// Token: 0x0600281E RID: 10270 RVA: 0x00093E54 File Offset: 0x00092054 public IEnumerable <string> GetNonThemedStyles(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootSlabsOnly) { IEnumerable <Slab> slabs = this.GetSlabs(slabManifestType, layout, features, includeBootSlabsOnly); IEnumerable <string> source = from slab in slabs from style in slab.Styles where slab.Styles != null && style.IsForLayout(layout) && style.IsNotThemed() select style.Name; return(source.Distinct(StringComparer.OrdinalIgnoreCase)); }
// Token: 0x06002823 RID: 10275 RVA: 0x00094708 File Offset: 0x00092908 public IEnumerable <string> GetLocalizedExtStringsScriptResources(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootSlabsOnly) { IEnumerable <Slab> slabs = this.GetSlabs(slabManifestType, layout, features, includeBootSlabsOnly); IEnumerable <string> source = from slab in slabs from stringSource in slab.Strings where stringSource.IsExtensibility() select stringSource.Name; return(source.Distinct(StringComparer.OrdinalIgnoreCase)); }
// Token: 0x06002821 RID: 10273 RVA: 0x00094378 File Offset: 0x00092578 public IEnumerable <string> GetFonts(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootSlabsOnly) { IEnumerable <Slab> slabs = this.GetSlabs(slabManifestType, layout, features, includeBootSlabsOnly); IEnumerable <string> source = from slab in slabs from font in slab.Fonts where slab.Fonts != null && font.IsForLayout(layout) select font.Name; return(source.Distinct(StringComparer.OrdinalIgnoreCase)); }
// Token: 0x06002822 RID: 10274 RVA: 0x000945A8 File Offset: 0x000927A8 public IEnumerable <string> GetLocalizedStringsScriptResources(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootSlabsOnly) { IEnumerable <Slab> slabs = this.GetSlabs(slabManifestType, layout, features, includeBootSlabsOnly); IEnumerable <string> first = from slab in slabs from stringSource in slab.PackagedStrings where stringSource.IsStandard() select stringSource.Name; IEnumerable <string> second = from slab in slabs from stringSource in slab.Strings where stringSource.IsStandard() && !slab.PackagedStrings.Any <SlabStringFile>() select stringSource.Name; return(first.Union(second).Distinct(StringComparer.OrdinalIgnoreCase)); }
// Token: 0x06002826 RID: 10278 RVA: 0x000947CC File Offset: 0x000929CC public SlabManifest GetSlabManifest(SlabManifestType slabManifestType, LayoutType layout) { if (this.owaVersion == null) { return(this.slabManifests[slabManifestType.Name][layout]); } string name = slabManifestType.Name; Dictionary <LayoutType, SlabManifest> dictionary; if (!this.slabManifests.TryGetValue(name, out dictionary)) { dictionary = new Dictionary <LayoutType, SlabManifest>(); string rootPath = FolderConfiguration.Instance.RootPath; string manifestDiskRelativeFolderPath = ResourcePathBuilderUtilities.GetManifestDiskRelativeFolderPath(this.owaVersion); string text = name + ".xml"; if (File.Exists(Path.Combine(rootPath, manifestDiskRelativeFolderPath, text))) { SlabManifest slabManifest = SlabManifestLoader.Load(rootPath, text, new Action <string, Exception>(SlabManifestCollection.LogManifestExceptionToEventLogs), manifestDiskRelativeFolderPath); slabManifest.Type = slabManifestType; foreach (LayoutType key in SlabManifestCollection.layoutTypes) { dictionary.Add(key, slabManifest); } } foreach (LayoutType layoutType in SlabManifestCollection.layoutTypes) { string text2 = string.Concat(new object[] { name.ToLowerInvariant(), ".", layoutType, ".xml" }); if (File.Exists(Path.Combine(rootPath, manifestDiskRelativeFolderPath, text2))) { SlabManifest slabManifest2 = SlabManifestLoader.Load(rootPath, text2, new Action <string, Exception>(SlabManifestCollection.LogManifestExceptionToEventLogs), manifestDiskRelativeFolderPath); slabManifest2.Type = slabManifestType; dictionary.Add(layoutType, slabManifest2); } } Dictionary <string, Dictionary <LayoutType, SlabManifest> > dictionary2 = new Dictionary <string, Dictionary <LayoutType, SlabManifest> >(this.slabManifests); if (!dictionary2.ContainsKey(name)) { dictionary2[slabManifestType.Name] = dictionary; } this.slabManifests = dictionary2; } return(dictionary[layout]); }
// Token: 0x06002828 RID: 10280 RVA: 0x000949E8 File Offset: 0x00092BE8 private IEnumerable <Slab> GetSlabs(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootSlabsOnly) { List <Slab> list = new List <Slab>(); if (includeBootSlabsOnly) { Slab slab = this.GetSlabManifest(slabManifestType, layout).GetBootSlabDefinition().GetSlab(features, layout); if (slab != null) { list.Add(slab); } } else { list = (from kv in this.GetSlabManifest(slabManifestType, layout).GetSlabs(features, layout) select kv.Value).ToList <Slab>(); } return(list); }
// Token: 0x0600264D RID: 9805 RVA: 0x0008A6CC File Offset: 0x000888CC protected virtual IEnumerable <string> GetNonThemedResources(CultureInfo userCultureInfo, bool generateBootResourcesAppcache) { bool isMowaClient = this.IsMowaClient; SlabManifestCollection slabManifestCollection = this.SlabManifestCollection; SlabManifestType slabManifestType = isMowaClient ? SlabManifestType.Pal : SlabManifestType.Standard; string[] enabledFeatures = this.GetEnabledFeatures(); this.GetLocalizedCultureNameForThemesResource(userCultureInfo); IEnumerable <string> first = from image in slabManifestCollection.GetNonThemedImages(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/images/{1}/{2}", this.VersionString, DefaultPageBase.IsRtl? "rtl" : "0", image); IEnumerable <string> second = from font in slabManifestCollection.GetFonts(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/styles/{1}", this.VersionString, font); IEnumerable <string> second2 = from style in slabManifestCollection.GetNonThemedStyles(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/styles/{1}", this.VersionString, style); return(first.Union(second).Union(second2)); }
// Token: 0x06002871 RID: 10353 RVA: 0x00095ADC File Offset: 0x00093CDC public static string GetEnabledFlightedFeaturesJsonArray(SlabManifestType type, IUserContext userContext, FlightedFeatureScope scope) { HashSet <string> source = new HashSet <string>(); if (userContext != null) { source = UserResourcesFinder.GetEnabledFlightedFeatures(type, userContext, scope); } DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(string[])); string @string; using (MemoryStream memoryStream = new MemoryStream()) { dataContractJsonSerializer.WriteObject(memoryStream, source.ToArray <string>()); memoryStream.Close(); @string = Encoding.UTF8.GetString(memoryStream.ToArray()); } return(@string); }
// Token: 0x0600264C RID: 9804 RVA: 0x0008A53C File Offset: 0x0008873C protected virtual IEnumerable <string> GetThemedResources(CultureInfo userCultureInfo, bool generateBootResourcesAppcache) { bool isMowaClient = this.IsMowaClient; SlabManifestCollection slabManifestCollection = this.SlabManifestCollection; SlabManifestType slabManifestType = isMowaClient ? SlabManifestType.Pal : SlabManifestType.Standard; string[] enabledFeatures = this.GetEnabledFeatures(); string theme = this.GetThemeFolder(); string locale = this.GetLocalizedCultureNameForThemesResource(userCultureInfo); IEnumerable <string> first = this.ShouldSkipThemeFolder() ? (from style in slabManifestCollection.GetThemedStyles(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/styles/{1}/{2}", this.VersionString, locale, style)) : slabManifestCollection.GetThemedStyles(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache).Select((string style) => string.Format("../prem/{0}/resources/themes/{1}/{2}/{3}", new object[] { this.VersionString, theme, locale, style })); IEnumerable <string> second = from image in slabManifestCollection.GetThemedImages(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/themes/{1}/images/{2}/{3}", new object[] { this.VersionString, theme, DefaultPageBase.IsRtl ? "rtl" : "0", image }); IEnumerable <string> second2 = this.ShouldSkipThemeFolder() ? (from image in slabManifestCollection.GetThemedSpriteStyles(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache) select string.Format("../prem/{0}/resources/images/{1}/{2}", this.VersionString, DefaultPageBase.IsRtl ? "rtl" : "0", image)) : slabManifestCollection.GetThemedSpriteStyles(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache).Select((string image) => string.Format("../prem/{0}/resources/themes/{1}/images/{2}/{3}", new object[] { this.VersionString, theme, DefaultPageBase.IsRtl ? "rtl" : "0", image })); return(first.Union(second).Union(second2)); }
// Token: 0x0600281B RID: 10267 RVA: 0x000939F4 File Offset: 0x00091BF4 public IEnumerable <string> GetCodeScriptResources(SlabManifestType slabManifestType, LayoutType layout, string[] features, bool includeBootResourcesOnly) { IEnumerable <Slab> slabs = this.GetSlabs(slabManifestType, layout, features, includeBootResourcesOnly); List <string> list = new List <string>(); foreach (Slab slab in slabs) { if (slab.PackagedSources.Any <SlabSourceFile>()) { foreach (SlabSourceFile slabSourceFile in slab.PackagedSources) { list.Add(slabSourceFile.Name); } } else { foreach (SlabSourceFile slabSourceFile2 in slab.Sources) { list.Add(slabSourceFile2.Name); } } } return(list.Distinct(StringComparer.OrdinalIgnoreCase)); }
// Token: 0x0600264B RID: 9803 RVA: 0x0008A228 File Offset: 0x00088428 protected virtual IEnumerable <string> GetScripts(bool generateBootResourcesAppcache) { bool isMowaClient = this.IsMowaClient; SlabManifestCollection slabManifestCollection = this.SlabManifestCollection; SlabManifestType slabManifestType = isMowaClient ? SlabManifestType.Pal : SlabManifestType.Standard; string[] enabledFeatures = this.GetEnabledFeatures(); IEnumerable <string> enumerable = from source in slabManifestCollection.GetCodeScriptResources(SlabManifestType.PreBoot, this.UserAgent.Layout, enabledFeatures, false).Union(slabManifestCollection.GetCodeScriptResources(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache)) select string.Format("../prem/{0}/scripts/{1}", this.VersionString, source); IEnumerable <string> source3 = from source in slabManifestCollection.GetLocalizedStringsScriptResources(SlabManifestType.PreBoot, this.UserAgent.Layout, enabledFeatures, false).Union(slabManifestCollection.GetLocalizedStringsScriptResources(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache)) select source; if (source3.Any <string>()) { LocalizedStringsScriptResource localizedStringsScriptResource = new LocalizedStringsScriptResource(source3.First <string>(), ResourceTarget.Any, this.VersionString); string cultureName = localizedStringsScriptResource.GetLocalizedCultureName(); IEnumerable <string> second = from source in source3 select string.Format("../prem/{0}/scripts/{1}/{2}", this.VersionString, cultureName.ToLowerInvariant(), source); enumerable = enumerable.Union(second); } IEnumerable <string> source2 = from source in slabManifestCollection.GetLocalizedExtStringsScriptResources(SlabManifestType.PreBoot, this.UserAgent.Layout, enabledFeatures, false).Union(slabManifestCollection.GetLocalizedExtStringsScriptResources(slabManifestType, this.UserAgent.Layout, enabledFeatures, generateBootResourcesAppcache)) select source; if (source2.Any <string>()) { LocalizedExtensibilityStringsScriptResource localizedExtensibilityStringsScriptResource = new LocalizedExtensibilityStringsScriptResource(source2.First <string>(), ResourceTarget.Any, this.VersionString); string cultureName = localizedExtensibilityStringsScriptResource.GetLocalizedCultureName(); IEnumerable <string> second2 = from source in source2 select string.Format("../prem/{0}/scripts/ext/{1}/{2}", this.VersionString, cultureName.ToLowerInvariant(), source); enumerable = enumerable.Union(second2); } return(enumerable); }
// Token: 0x06002824 RID: 10276 RVA: 0x000947B1 File Offset: 0x000929B1 public string GetSlabsJson(SlabManifestType slabManifestType, string[] features, LayoutType layout) { return(this.GetSlabManifest(slabManifestType, layout).GetSlabsJson(features, layout)); }
// Token: 0x06002870 RID: 10352 RVA: 0x00095ABC File Offset: 0x00093CBC public static ResourceBase[] GetUserDataEmbeddedLinks(SlabManifestType manifestType, LayoutType layout, string owaVersion) { Slab bootSlab = UserResourcesFinder.CreateUserBootSlab(manifestType, layout, owaVersion); return(UserResourcesFinder.GetUserDataEmbeddedLinks(bootSlab, owaVersion)); }