public void SetDataSourceModule(int tabId, int moduleId, ModuleInfo getModule, TemplateManifest template, string data) { TabId = tabId; ModuleId = moduleId; Module = getModule; OtherModuleTemplate = template; OtherModuleSettingsJson = data; }
internal static bool QueryAvailable(this TemplateManifest template) { var schemaFileUri = new FileUri(template.ManifestFolderUri.UrlFolder, "query-schema.json"); if (schemaFileUri.FileExists) { return(true); } return(false); }
internal static bool DataNeeded(this TemplateManifest template) { var schemaFileUri = new FileUri(template.ManifestFolderUri.UrlFolder, "schema.json"); if (schemaFileUri.FileExists) { return(true); } return(false); }
internal static bool SettingsNeeded(this TemplateManifest template) { var schemaFileUri = new FileUri(template.ManifestFolderUri.UrlFolder, template.Key.ShortKey + "-schema.json"); if (schemaFileUri.FileExists) { return(true); } return(false); }
public RenderInfo(TemplateManifest template, bool isOtherModule) { SettingsJson = ""; DataJson = ""; OutputString = ""; Template = null; Files = null; Template = template; IsOtherModule = isOtherModule; }
internal static bool DataNeeded(this TemplateManifest template) { string prefix = (string.IsNullOrEmpty(template.Collection) || template.Collection == "Items") ? "" : template.Collection + "-"; var schemaFileUri = new FileUri(template.ManifestFolderUri.UrlFolder, prefix + "schema.json"); if (schemaFileUri.FileExists) { return(true); } return(false); }
internal static Manifest GetManifest(TemplateKey templateKey, out TemplateManifest templateManifest) { templateManifest = null; if (templateKey == null) { return(null); } Manifest manifest; if (templateKey.Extention == "manifest") { manifest = GetFileManifest(templateKey.TemplateDir); //todo downgrade template directories that stop using manifests } else { //todo upgrade template directories that start using manifests //manifest = GetFileManifest(templateKey.TemplateDir); //if (manifest == null) // manifest = GetVirtualManifest(templateKey); //else if (manifest.Templates == null) manifest = GetVirtualManifest(templateKey); } if (manifest != null && manifest.HasTemplates) { //store some info into the Manifest object and its templates for backlink reference manifest.ManifestDir = templateKey.TemplateDir; foreach (KeyValuePair <string, TemplateManifest> keyValuePair in manifest.Templates) { keyValuePair.Value.SetSource(templateKey); } //get the requested template by Key templateManifest = manifest.GetTemplateManifest(templateKey); } return(manifest); }
internal static FileUri MainTemplateUri(this TemplateManifest templateUri) { return(templateUri == null || templateUri.Main == null ? null : new FileUri(templateUri.ManifestFolderUri, templateUri.Main.Template)); }
internal static FileUri DetailTemplateUri(this TemplateManifest templateUri) { return(templateUri?.Detail == null ? null : new FileUri(templateUri.ManifestFolderUri, templateUri.Detail.Template)); }