コード例 #1
0
        public static int ExcProgram(params string[] args)
        {
            CommandLineOptions opt = null;

            opt = Parse(Console.Out, args);
            opt.Execute();
            return(opt.ShowHelp ? 1 : 0); // count help as a non-success (we didn't generate code)
        }
コード例 #2
0
        //[MenuItem("BuildTools/BuildXslx")]
        public static void BuildXsxl2Cs(string protopath, string cspath, string cpath = "")
        {
            CommandLineOptions opt = new CommandLineOptions(Console.Out);

            //opt.InPaths.Add("D:\\Work_new\\DNF_Project\\Program\\Share\\table\\proto\\Union.proto");
            opt.InPaths.Add(Path.GetFullPath(protopath));

            //opt.OutPath = "D:\\Work_new\\DNF_Project\\Program\\Client\\Assets\\Scripts\\01TableScript\\table\\Union.cs";//Path.GetFullPath(cspath);
            opt.OutPath  = Path.GetFullPath(cspath);
            opt.OutCPath = Path.GetFullPath(cpath);
            opt.Template = cs.TablePathConfig.CSCodeTemplatePath;
            opt.Execute();
        }
コード例 #3
0
ファイル: CommandLineOptions.cs プロジェクト: cash2one/HBNews
        public static int Main(params string[] args)
        {
            CommandLineOptions opt = null;

            try
            {
                opt = Parse(Console.Out, args);
                opt.Execute();
                return(opt.ShowHelp ? 1 : 0); // count help as a non-success (we didn't generate code)
            }
            catch (Exception ex)
            {
                Console.Error.Write(ex.Message);
                return(1);
            }
        }
コード例 #4
0
        //[MenuItem("BuildTools/BuildXslx")]
        public static void BuildXsxl2Cs(string protopath, string cspath, string cpath = "", Dictionary <string, string> fieldCryptic = null, string outclassPrefix = "")
        {
            CommandLineOptions opt = new CommandLineOptions(Console.Out);

            //opt.InPaths.Add("D:\\Work_new\\DNF_Project\\Program\\Share\\table\\proto\\Union.proto");
            opt.InPaths.Add(Path.GetFullPath(protopath));

            //opt.OutPath = "D:\\Work_new\\DNF_Project\\Program\\Client\\Assets\\Scripts\\01TableScript\\table\\Union.cs";//Path.GetFullPath(cspath);
            opt.OutPath  = Path.GetFullPath(cspath);
            opt.OutCPath = Path.GetFullPath(cpath);
#if TABLE_DATA_LOAD
            opt.Template = "Assets/Editor/ProtoGen/csharpForScriptableObject.xslt";
#else
            opt.Template = "Assets/Editor/ProtoGen/csharp_cryptic.xslt";
#endif
            opt.outClassPrefix = outclassPrefix;
            opt.FieldCryptic   = fieldCryptic;
            opt.Execute();
        }