コード例 #1
0
ファイル: BaseWorker.cs プロジェクト: goldmint/gm-web-cab
 protected BaseWorker(BaseOptions opts)
 {
     if (opts.Period.TotalSeconds < 1)
     {
         _period = TimeSpan.FromSeconds(1);
     }
     else
     {
         _period = opts.Period;
     }
     _once = opts.Once;
     if (opts.CancellationToken == null)
     {
         throw new ArgumentException("cancellation token is null");
     }
     CancellationToken = opts.CancellationToken;
 }
コード例 #2
0
 public NotificationSender(BaseOptions opts) : base(opts)
 {
 }