Implemented using the filename of the specified .resw file as the generated class name
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user