Exemplo n.º 1
0
 /// <summary>
 /// constructor
 /// </summary>
 public AppSetting(string[] appArgs)
 {
     AppArgs         = appArgs;
     setting_cmdline = new Setting_CmdLine();
     setting_file    = new Setting_File();
     IgnoreCh        = new Setting_IgnoreCH();
     ProgramInfo     = new ProgramInfo();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Setting_File --> AppSettingに反映
 /// </summary>
 private void Reflect_fromFile(Setting_File file)
 {
     //string --> string[]
     this.File_CommandLine = file.CommandLine
                             .Split()
                             .Where(arg => string.IsNullOrWhiteSpace(arg) == false)
                             .ToArray();
     this.BuffSize_MiB               = file.BuffSize_MiB;
     this.ReadLimit_MiBsec           = file.ReadLimit_MiBsec;
     this.MidInterval_min            = file.MidInterval_min;
     this.PipeTimeout_sec            = file.PipeTimeout_sec;
     this.LockMove                   = file.LockMove;
     this.Client_Pipe                = file.Client_Pipe;
     this.Process_GetExternalCommand = file.Process_GetExternalCommand;
     this.PreProcess                 = file.PreProcess;
     this.MidProcess                 = file.MidProcess;
     this.PostProcess                = file.PostProcess;
 }
Exemplo n.º 3
0
        /// <summary>
        /// xml、CmdLine、text file読み込み
        /// </summary>
        public bool GetParam1()
        {
            //xml
            XmlPath      = XmlPath ?? "pfAdapter.xml";
            setting_file = Setting_File.LoadFile(XmlPath);
            if (setting_file == null)
            {
                return(false);//not found xml
            }
            Reflect_fromFile(setting_file);

            //CmdLine
            setting_cmdline.ParseParam(File_CommandLine);
            setting_cmdline.ParseParam(AppArgs);
            Reflect_fromCmdLine(setting_cmdline);

            //text file
            ProgramInfo.GetInfo(File);
            IgnoreCh.Check(ProgramInfo.Channel, XmlPath);
            return(true);
        }