CommandLine exe参数

复制代码
 [Verb("OptionsEntity")]
    public class OptionsEntity
    {
        [Option('a', HelpText = "Plantform Advitiser id", MetaValue = "Plantform Advitiser id", Required = false)]
        public string AdvitiserId { get; set; }
        [Option('c', HelpText = "Channel Id (int)", MetaValue = "Channel Id (int)", Required = false)]
        public int ChannelId { get; set; }
        [Option('s', HelpText = "Start Date", MetaValue = "The start date of the download", Required = false)]
        public DateTime StartDate { get; set; }
        [Option('e', HelpText = "End Date", MetaValue = "The end date of the download", Required = false)]
        public DateTime EndDate { get; set; }
        [Option('t', HelpText = "Sync Customer||Account||Campaign", MetaValue = "Sync Customer || Account || Campaign", Required = false)]
        public bool SyncCustomerAccountCampaign { get; set; }

    }
复制代码

 

cmd中执行命令

1
start DownloadDailyReportCsvToHadoop.exe OptionsEntity  -c 1 -s 2018-03-01 -e 2018-03-04 -t true

 

 

powershell中执行命令:

1
cmd /c dotnet DVM.Report.DownLoadTools.dll  AppNexusCmd -s %startDate% -e %appNexusEndDate%

  

 

 

posted @   PanPan003  阅读(632)  评论(0编辑  收藏  举报
编辑推荐:
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 没有源码,如何修改代码逻辑?
· NetPad:一个.NET开源、跨平台的C#编辑器
· 面试官:你是如何进行SQL调优的?
点击右上角即可分享
微信分享提示