Пример #1
0
 public override bool? Match(ProcessorArgs args)
 {
     if (!args.OnlyShorteningRequired)
       {
     return false;
       }
       if (base.Match(args) == true)
       {
     return true;
       }
       else
       {
     return null;
       }
 }
Пример #2
0
 public static bool TryToResolveHandler(ProcessorArgs pipelineArgs, out RequestHandler handler)
 {
     foreach (var requestHandler in Handlers)
       {
     var handlerMatch = requestHandler.Match(pipelineArgs);
     if (handlerMatch == true)
     {
       handler = requestHandler;
       return true;
     }
     if (handlerMatch == null)
     {
       break;
     }
       }
       handler = null;
       return false;
 }
Пример #3
0
   public virtual void ProcessRequest(
 bool onlyShorteningRequired,
 bool clipboardEvent,
 string predefinedClipboardValue,
 bool globalIconIsOriginator)
   {
       try
         {
       var processorsArgs = new ProcessorArgs(onlyShorteningRequired, clipboardEvent, predefinedClipboardValue, globalIconIsOriginator);
       foreach (var processor in this.Processors)
       {
         processor.Process(processorsArgs);
         if (processorsArgs.Aborted)
         {
       break;
         }
       }
         }
         catch
         {
       var notifyManager = Factory.ActualFactory.GetNotifyIconManager();
       notifyManager.SetNewIcon(notifyManager.ErrorTrayIcon, 250);
         }
   }
Пример #4
0
 public virtual bool? Match(ProcessorArgs args)
 {
     string inputValue = args.ResultUrl;
       return this.RegularExpressionsToMatch.Any(matchRegularExpression => Regex.Match(inputValue, matchRegularExpression).Success);
 }
Пример #5
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args)
 {
     this.HandleErrorAndAbortPipeline(args, this.ErrorTrayIcon);
 }
Пример #6
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args, Icon errorIcon)
 {
     args.CurrentNotifyIconChangerClient.SetIcon(errorIcon);
     args.Abort();
 }
Пример #7
0
 public virtual void Process(ProcessorArgs args)
 {
 }
Пример #8
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args)
 {
     this.HandleErrorAndAbortPipeline(args, this.ErrorTrayIcon);
 }
Пример #9
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args, Icon errorIcon)
 {
     args.CurrentNotifyIconChangerClient.SetIcon(errorIcon);
       args.Abort();
 }
Пример #10
0
 public virtual void Process(ProcessorArgs args)
 {
 }