Esempio n. 1
0
 public void ElementStart(IFormHandlerContext context)
 {
     ElementInfo ei = context.CurrentElement;
     string typeName = ei.GetAttributeValue("type");
     if (typeName == null) throw new Exception("type not specified in <custom>");
     Type t = Type.GetType(typeName);
     if (t == null) throw new Exception("Type not found: " + typeName);
     _handler = (IElementHandler) Activator.CreateInstance(t);
     if (_handler == null) throw new Exception("Failed to create instance of type " + typeName);
     _handler.ElementStart(context);
 }