if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == subTree.Name)
+ if (expT.Name == subTree.Name) {
t = expT;
+ break;
+ }
}
}
GraphicObject go = (GraphicObject)Activator.CreateInstance(t);
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == subTree.Name)
+ if (expT.Name == subTree.Name) {
t = expT;
+ break;
+ }
}
}
if (t == null)
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == xr.Name)
+ if (expT.Name == xr.Name) {
t = expT;
+ break;
+ }
}
}
if (t == null)
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == xr.Name)
+ if (expT.Name == xr.Name) {
t = expT;
+ break;
+ }
}
}
GraphicObject go = (GraphicObject)Activator.CreateInstance (t);
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == xr.Name)
+ if (expT.Name == xr.Name) {
t = expT;
+ break;
+ }
}
}
if (t == null)
else {
foreach (string it in ItemTemplates.Keys) {
Type t = Type.GetType (it);
+ if (t == null) {
+ Assembly a = Assembly.GetEntryAssembly ();
+ foreach (Type expT in a.GetExportedTypes ()) {
+ if (expT.Name == it) {
+ t = expT;
+ break;
+ }
+ }
+ }
if (t == null)
continue;
if (t.IsAssignableFrom (dataType)) {//TODO:types could be cached
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == root)
+ if (expT.Name == root) {
t = expT;
+ break;
+ }
}
}
+ if (t == null)
+ throw new Exception ("IML parsing error: undefined root type (" + root + ")");
return t;
}
void emitLoader (XmlTextReader reader, Context ctx)
if (t == null) {
Assembly a = Assembly.GetEntryAssembly ();
foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == reader.Name)
+ if (expT.Name == reader.Name) {
t = expT;
+ break;
+ }
}
}
if (t == null)
public void CreateExpandDelegate (TemplatedGroup host){
Type dataType = Type.GetType(strDataType);
+ if (dataType == null) {
+ Assembly a = Assembly.GetEntryAssembly ();
+ foreach (Type expT in a.GetExportedTypes ()) {
+ if (expT.Name == strDataType) {
+ dataType = expT;
+ break;
+ }
+ }
+ }
+ if (dataType == null) {
+ Debug.WriteLine ("ItemTemplate error: DataType not found: {0}.", strDataType);
+ return;
+ }
Type tmpGrpType = typeof(TemplatedGroup);
Type evtType = typeof(EventHandler);