Beispiel #1
0
        public string ConvertToTypeScript(string fileName, FileNameConversionOptions options)
        {
            var convertedName = Path.GetFileNameWithoutExtension(fileName);

            convertedName  = convertedName.HasInterfacePrefix() ? convertedName.RemoveInterfacePrefix() : convertedName;
            convertedName  = options.UseKebabCase ? convertedName.ToKebabCase() : convertedName.ToCamelCase();
            convertedName  = options.AppendModelSuffix ? convertedName + ".model" : convertedName;
            convertedName += ".ts";

            return(convertedName);
        }
Beispiel #2
0
 private string GetOutputFilePath(string input, string output, FileNameConversionOptions options)
 => !input.EndsWithFileExtension() ? throw new ArgumentException()