Files
reswcodegen/RESW File Code Generator/ReswCodeGen.CustomTool/ClassNameExtractor.cs
T

17 lines
489 B
C#
Raw Normal View History

using System.IO;
namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.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);
}
}
}