Files
reswcodegen/vs2017/VSPackage/CustomTool/ClassNameExtractor.cs
T
2017-11-09 09:53:29 +01:00

17 lines
483 B
C#

using System.IO;
namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.VSPackage.CustomTool
{
public static class ClassNameExtractor
{
public static string GetClassName(string wszInputFilePath)
{
if (!File.Exists(wszInputFilePath))
throw new FileNotFoundException();
var fileInfo = new FileInfo(wszInputFilePath);
return fileInfo.Name.Replace(fileInfo.Extension, string.Empty);
}
}
}