コード例 #1
0
        private static void AddCasingParams(string name, ITemplateInfo template, GenInfo genInfo)
        {
            foreach (var textCasing in template.GetTextCasings())
            {
                var value = textCasing.Key == "sourceName"
                    ? name
                    : genInfo.Parameters.SafeGet($"wts.{textCasing.Key}");

                if (!string.IsNullOrEmpty(value))
                {
                    if (!genInfo.Parameters.ContainsKey(textCasing.ParameterName))
                    {
                        genInfo.Parameters.Add(textCasing.ParameterName, textCasing.Transform(value));
                    }
                }
            }
        }