40 lines
939 B
C#
40 lines
939 B
C#
using System;
|
|
using System.Text;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using System.IO;
|
|
|
|
namespace cscz
|
|
{
|
|
class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
if(args.Length >= 1 && args[0] == "--help")
|
|
{
|
|
Assembly asm = Assembly.GetExecutingAssembly();
|
|
/*** Debug - Lists the names of all embedded resources ***
|
|
foreach(string str in asm.GetManifestResourceNames())
|
|
Console.WriteLine(str);*/
|
|
StreamReader helpTextReader = new StreamReader(asm.GetManifestResourceStream(@"cscz.Help.md"));
|
|
string helpText = helpTextReader.ReadToEnd();
|
|
helpTextReader.Dispose();
|
|
Console.WriteLine(helpText);
|
|
return;
|
|
}
|
|
|
|
ClassGenerator cg = new ClassGenerator();
|
|
/*
|
|
cg.Signatures.Add("float radius");
|
|
cg.Signatures.Add("double weight");
|
|
Console.WriteLine(cg);
|
|
*/
|
|
|
|
string source = Console.In.ReadToEnd();
|
|
cg.ParseString(source);
|
|
|
|
Console.WriteLine(cg);
|
|
}
|
|
}
|
|
}
|