cscz/cscz/Program.cs

40 lines
939 B
C#
Raw Normal View History

2016-05-07 19:03:44 +00:00
using System;
2016-05-07 19:31:15 +00:00
using System.Text;
using System.Diagnostics;
2016-05-08 11:14:34 +00:00
using System.Reflection;
using System.IO;
2016-05-07 19:03:44 +00:00
namespace cscz
{
class Program
{
public static void Main(string[] args)
{
2016-05-08 11:14:34 +00:00
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;
}
2016-05-07 19:03:44 +00:00
ClassGenerator cg = new ClassGenerator();
2016-05-07 19:31:15 +00:00
/*
2016-05-07 19:03:44 +00:00
cg.Signatures.Add("float radius");
cg.Signatures.Add("double weight");
Console.WriteLine(cg);
2016-05-07 19:31:15 +00:00
*/
string source = Console.In.ReadToEnd();
cg.ParseString(source);
Console.WriteLine(cg);
2016-05-07 19:03:44 +00:00
}
}
}