示例#1
0
        internal void InvokePreProcessingEvent(MapBuilder mapBuilder, out bool allow)
        {
            allow = true;
            var ev = new PreProcessingEventArgs
            {
                Allow      = allow,
                MapBuilder = mapBuilder
            };

            PreProcessingEvent?.Invoke(ev);
            allow = ev.Allow;
        }
 public Image Process(Image sourceImage, Dictionary <String, String> parameters)
 {
     if (ValidateParameters(parameters))
     {
         PreProcessingEvent.Publish(new EventArgs());
         var resultImage = AlgorithmImplementation(sourceImage, parameters);
         PostProcessingEvent.Publish(new EventArgs());
         return(resultImage);
     }
     else
     {
         throw new Exception("Invalid parameters.");
     }
 }