Beispiel #1
0
 public GenerateFromProjectCommand()
 {
     Name          = "gen-fromproject";
     Description   = "Generates a Nethereum (c#) code based based on the abi";
     _projectPath  = Option("-p | --projectPath", "The project file name and path", CommandOptionType.SingleValue);
     _assemblyName = Option("-a | --assemblyName", "The output assembly name for the project", CommandOptionType.SingleValue);
     HelpOption("-? | -h | --help");
     OnExecute((Func <int>)RunCommand);
     CodeGenerationWrapper = new CodeGenerationWrapper();
 }
Beispiel #2
0
        public GenerateFromProjectCommand()
        {
            Name          = "from-project";
            Description   = "Generates Nethereum code based on one or many abi's within a project.";
            _projectPath  = Option("-p | --projectPath", "The full project file path or path to the project folder.", CommandOptionType.SingleValue);
            _assemblyName = Option("-a | --assemblyName", "The output assembly name for the project", CommandOptionType.SingleValue);
            OnExecute((Func <int>)RunCommand);
            CodeGenerationWrapper = new CodeGenerationWrapper();

            this.AddHelpOption();
        }
 public GenerateFromAbiCommand()
 {
     Name             = "gen-fromabi";
     Description      = "Generates a Nethereum (c#) code based based on the abi";
     _contractName    = Option("-cn | --contractName", "The contract name", CommandOptionType.SingleValue);
     _abiFilePath     = Option("-abi | --abiPath", "The abi file and path", CommandOptionType.SingleValue);
     _binCodeFilePath = Option("-bin | --binPath", "The bin file and path", CommandOptionType.SingleValue);
     _outputFolder    = Option("-o | --outputPath", "The output path for the generated code", CommandOptionType.SingleValue);
     _baseNamespace   = Option("-ns | --namespace", "The base namespace for the generated code", CommandOptionType.SingleValue);
     HelpOption("-? | -h | --help");
     OnExecute((Func <int>)RunCommand);
     CodeGenerationWrapper = new CodeGenerationWrapper();
 }
Beispiel #4
0
        public GenerateFromTruffleCommand()
        {
            Name           = "from-truffle";
            Description    = "Generates Nethereum code based based on a collection of compiled contracts.";
            _directory     = Option("-d | --directory", "The directory containing the compiled contracts (Mandatory)", CommandOptionType.SingleValue);
            _outputFolder  = Option("-o | --outputPath", "The output path for the generated code (Mandatory)", CommandOptionType.SingleValue);
            _baseNamespace = Option("-ns | --namespace", "The base namespace for the generated code (Mandatory)", CommandOptionType.SingleValue);
            _singleFile    = Option("-sf | --singleFile", "Generate the message definition in a single file (Optional - default is true)", CommandOptionType.SingleValue);
            OnExecute((Func <int>)RunCommand);
            CodeGenerationWrapper = new CodeGenerationWrapper();

            this.AddHelpOption();
        }
        public GenerateFromAbiCommand()
        {
            Name             = "from-abi";
            Description      = "Generates Nethereum code based based on a single abi.";
            _contractName    = Option("-cn | --contractName", "The contract name (Optional)", CommandOptionType.SingleValue);
            _abiFilePath     = Option("-abi | --abiPath", "The abi file and path (Mandatory)", CommandOptionType.SingleValue);
            _binCodeFilePath = Option("-bin | --binPath", "The bin file and path (Optional)", CommandOptionType.SingleValue);
            _outputFolder    = Option("-o | --outputPath", "The output path for the generated code (Mandatory)", CommandOptionType.SingleValue);
            _baseNamespace   = Option("-ns | --namespace", "The base namespace for the generated code (Mandatory)", CommandOptionType.SingleValue);
            _singleFile      = Option("-sf | --SingleFile", "Generate the message definition in a single file (Optional - default is true)", CommandOptionType.SingleValue);
            OnExecute((Func <int>)RunCommand);
            CodeGenerationWrapper = new CodeGenerationWrapper();

            this.AddHelpOption();
        }