Example #1
0
        internal static void ExportTagDictionary()
        {
            var tagDictionary     = TagDictionaryBuilder.BuildLazy(Arguments.FixedPath);
            var tagDictionaryJson = JsonConvert.SerializeObject(tagDictionary, Formatting.Indented);

            if (!string.IsNullOrWhiteSpace(Arguments.DictionarySavePath))
            {
                File.WriteAllText(Arguments.DictionarySavePath, tagDictionaryJson);
            }

            if (!string.IsNullOrWhiteSpace(Arguments.DictionaryPostUrl))
            {
                using (var cli = new WebClient {
                    Headers = { [HttpRequestHeader.ContentType] = "application/json" }
                })
                {
                    cli.UploadString(Arguments.DictionaryPostUrl, tagDictionaryJson);
                }
            }
        }
Example #2
0
        internal static string Render(this string s)
        {
            var tagDictionary = TagDictionaryBuilder.BuildLazy(Arguments.FixedPath);

            return(s.RenderTemplate(tagDictionary));
        }
Example #3
0
        internal static void DefaultUpdate()
        {
            var tagDictionary = TagDictionaryBuilder.BuildLazy(Arguments.FixedPath);

            ProcessSubstitution.Update(Arguments.SubstitutionPath, tagDictionary, Arguments.OutputFailureContext);
        }
Example #4
0
        internal static void UpdateFiles()
        {
            var tagDictionary = TagDictionaryBuilder.BuildLazy(Arguments.FixedPath);

            ProcessFiles.UpdateFiles(Arguments.DeployFrom, Arguments.TemplateFilters, tagDictionary);
        }