示例#1
0
文件: MainForm.cs 项目: ifzz/FDK
 void OnConvert(object sender, EventArgs e)
 {
     try
     {
         var converter = new Converter();
         this.m_destination.Text = converter.Process(null, "MyAdviser", this.m_source.Text);
     }
     catch (Exception ex)
     {
         this.m_destination.Text = ex.ToString();
     }
 }
示例#2
0
文件: Program.cs 项目: ifzz/FDK
        static bool TryRunAsConvert(string[] args)
        {
            if (args.Length > 3)
            {
                return false;
            }

            var intputPath = args[0];
            var outputPath = Path.ChangeExtension(intputPath, "cs");
            var className = (args.Length > 1) ? args[1] : "MyAdviser";
            var namespaceName = (args.Length > 2) ? args[2] : "MyNamespace";

            var converter = new Converter();
            converter.Process(namespaceName, className, intputPath, outputPath);

            return true;
        }