public static bool IsSupportedOnPlatform([NotNull] this CompleteApplicationMetadataDefinition application, ClientPlatform platform) { if (application == null) { throw new ArgumentNullException("application"); } switch (platform) { case ClientPlatform.Web: return(application.IsWebSupported()); case ClientPlatform.Mobile: return(application.IsMobileSupported()); default: throw new ArgumentOutOfRangeException(platform.ToString()); } }
internal static string GetMenuPath(ClientPlatform platform) { return(MetadataParsingUtils.GetPath(String.Format(MenuPattern, platform.ToString().ToLower()))); }
internal MenuDefinition InitializeMenu(ClientPlatform platform, Stream streamValidator = null) { try { using (var stream = MetadataParsingUtils.GetStream(streamValidator, String.Format(MenuPattern, platform.ToString().ToLower()))) { return(stream == null ? null : new XmlMenuMetadataParser().Parse(stream)); } } catch (Exception) { Log.Warn(String.Format("menu.{0}.xml not found", platform)); } return(null); }