private void ExecuteSetDefine(XmlElement element, MagickReadSettings readSettings)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "flag")
arguments["flag"] = Variables.GetValue<Boolean>(attribute);
else if (attribute.Name == "format")
arguments["format"] = Variables.GetValue<MagickFormat>(attribute);
else if (attribute.Name == "name")
arguments["name"] = Variables.GetValue<String>(attribute);
else if (attribute.Name == "value")
arguments["value"] = Variables.GetValue<String>(attribute);
}
if (OnlyContains(arguments, "format", "name", "flag"))
readSettings.SetDefine((MagickFormat)arguments["format"], (String)arguments["name"], (Boolean)arguments["flag"]);
else if (OnlyContains(arguments, "format", "name", "value"))
readSettings.SetDefine((MagickFormat)arguments["format"], (String)arguments["name"], (String)arguments["value"]);
else if (OnlyContains(arguments, "name", "value"))
readSettings.SetDefine((String)arguments["name"], (String)arguments["value"]);
else
throw new ArgumentException("Invalid argument combination for 'setDefine', allowed combinations are: [format, name, flag] [format, name, value] [name, value]");
}
private void ExecuteSetDefines(XmlElement element, MagickReadSettings readSettings)