//=========================================================================================== public override void WriteCode(IndentedTextWriter writer) { writer.Write(TypeName); writer.Write(" MagickScript::Create"); writer.Write(ClassName); writer.WriteLine("(XmlElement^ element)"); WriteStartColon(writer); foreach (string name in MagickNET.GetColorProfileNames()) { writer.Write("if (element->GetAttribute(\"name\") == \""); writer.Write(name); writer.WriteLine("\")"); writer.Indent++; writer.Write("return ColorProfile::"); writer.Write(name); writer.WriteLine(";"); writer.Indent--; } writer.WriteLine("throw gcnew NotImplementedException(element->Name);"); WriteEndColon(writer); }