public override bool? Match(ProcessorArgs args)
 {
     if (!args.OnlyShorteningRequired)
       {
     return false;
       }
       if (base.Match(args) == true)
       {
     return true;
       }
       else
       {
     return null;
       }
 }
 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;
 }
Exemple #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);
         }
   }
Exemple #4
0
 public virtual bool? Match(ProcessorArgs args)
 {
     string inputValue = args.ResultUrl;
       return this.RegularExpressionsToMatch.Any(matchRegularExpression => Regex.Match(inputValue, matchRegularExpression).Success);
 }
Exemple #5
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args)
 {
     this.HandleErrorAndAbortPipeline(args, this.ErrorTrayIcon);
 }
Exemple #6
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args, Icon errorIcon)
 {
     args.CurrentNotifyIconChangerClient.SetIcon(errorIcon);
     args.Abort();
 }
Exemple #7
0
 public virtual void Process(ProcessorArgs args)
 {
 }
Exemple #8
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args)
 {
     this.HandleErrorAndAbortPipeline(args, this.ErrorTrayIcon);
 }
Exemple #9
0
 protected virtual void HandleErrorAndAbortPipeline(ProcessorArgs args, Icon errorIcon)
 {
     args.CurrentNotifyIconChangerClient.SetIcon(errorIcon);
       args.Abort();
 }
Exemple #10
0
 public virtual void Process(ProcessorArgs args)
 {
 }