/// <summary> /// Get widget template content /// </summary> /// <param name="widgetSetup"></param> /// <returns></returns> public static string GetTemplateContent(WidgetSetupModel widgetSetup) { return (EmbeddedResourceHelper.GetString( string.Format("{0}.{1}.{2}.cshtml", DataSetupResourceType.WidgetTemplate.GetEnumName(), widgetSetup.Widget, widgetSetup.DefaultTemplate), ResourceNamespace)); }
/// <summary> /// Get module resource content /// </summary> /// <param name="resourceName"></param> /// <param name="moduleResourceNameSpace"></param> /// <param name="type"></param> /// <returns></returns> public static string GetModuleResourceContent(string resourceName, string moduleResourceNameSpace, ResourceType type = ResourceType.None) { if (type == ResourceType.None) { return(EmbeddedResourceHelper.GetString(resourceName, ResourceNamespace)); } return(EmbeddedResourceHelper.GetString(string.Format("{0}.{1}", type.GetEnumName(), resourceName), moduleResourceNameSpace)); }
/// <summary> /// Get plugin resource content /// </summary> /// <param name="resourceName"></param> /// <param name="pluginResourceNameSpace"></param> /// <param name="type"></param> /// <returns></returns> public static string GetPluginResourceContent(string resourceName, string pluginResourceNameSpace, DataSetupResourceType type = DataSetupResourceType.None) { if (type == DataSetupResourceType.None) { return(EmbeddedResourceHelper.GetString(resourceName, ResourceNamespace)); } return(EmbeddedResourceHelper.GetString(string.Format("{0}.{1}", type.GetEnumName(), resourceName), pluginResourceNameSpace)); }
/// <summary> /// Get git version of EzCMS /// </summary> /// <returns></returns> public static string GetEzCMSVersion() { var version = StateManager.GetApplication <string>(EzCMSContants.EzCMSVersion); if (string.IsNullOrEmpty(version)) { version = EmbeddedResourceHelper.GetString("version.txt", "EzCMS.Web.App_Data"); if (HttpContext.Current != null) { StateManager.SetApplication(EzCMSContants.EzCMSVersion, version); } } return(version); }
public static string GetEzCMSResource(string name, string template, ResourceTypeEnums resourceType) { var @namespace = string.Format("{0}.{1}.Resources.{2}", Namespace, template, resourceType.GetEnumName()); return(EmbeddedResourceHelper.GetString(name, @namespace)); }
/// <summary> /// Get starter /// </summary> /// <param name="name"></param> /// <param name="namespace"></param> /// <returns></returns> public static string GetResource(string name, string @namespace) { return(EmbeddedResourceHelper.GetString(name, @namespace)); }