private IMagickImage ExecuteCombine(XmlElement element, IMagickImageCollection collection) { Hashtable arguments = new Hashtable(); foreach (XmlAttribute attribute in element.Attributes) { arguments[attribute.Name] = Variables.GetValue <ColorSpace>(attribute); } if (arguments.Count == 0) { return(collection.Combine()); } else if (OnlyContains(arguments, "colorSpace")) { return(collection.Combine((ColorSpace)arguments["colorSpace"])); } else { throw new ArgumentException("Invalid argument combination for 'combine', allowed combinations are: [] [colorSpace]"); } }