コード例 #1
0
 public JobOptions CloneExistant(JobOptions options)
 {
     return(options switch
     {
         MultiRunJobOptions x => CloneMultiRun(x),
         ProxyCheckJobOptions x => Cloner.Clone(x),
         _ => throw new NotImplementedException()
     });
コード例 #2
0
        public JobOptions CreateNew(JobType type)
        {
            JobOptions options = type switch
            {
                JobType.MultiRun => MakeMultiRun(),
                JobType.ProxyCheck => MakeProxyCheck(),
                _ => throw new NotImplementedException()
            };

            options.StartCondition = new RelativeTimeStartCondition();
            return(options);
        }