ImageMagick.MagickScript.ExecuteSelectiveBlur C# (CSharp) Method

ExecuteSelectiveBlur() private method

private ExecuteSelectiveBlur ( XmlElement element, MagickImage image ) : void
element XmlElement
image MagickImage
return void
    private void ExecuteSelectiveBlur(XmlElement element, MagickImage image)
    {
      Hashtable arguments = new Hashtable();
      foreach (XmlAttribute attribute in element.Attributes)
      {
        if (attribute.Name == "channels")
          arguments["channels"] = Variables.GetValue<Channels>(attribute);
        else if (attribute.Name == "radius")
          arguments["radius"] = Variables.GetValue<double>(attribute);
        else if (attribute.Name == "sigma")
          arguments["sigma"] = Variables.GetValue<double>(attribute);
        else if (attribute.Name == "threshold")
          arguments["threshold"] = Variables.GetValue<double>(attribute);
      }
      if (OnlyContains(arguments, "radius", "sigma", "threshold"))
        image.SelectiveBlur((double)arguments["radius"], (double)arguments["sigma"], (double)arguments["threshold"]);
      else if (OnlyContains(arguments, "radius", "sigma", "threshold", "channels"))
        image.SelectiveBlur((double)arguments["radius"], (double)arguments["sigma"], (double)arguments["threshold"], (Channels)arguments["channels"]);
      else
        throw new ArgumentException("Invalid argument combination for 'selectiveBlur', allowed combinations are: [radius, sigma, threshold] [radius, sigma, threshold, channels]");
    }
    private void ExecuteSepiaTone(XmlElement element, MagickImage image)
MagickScript