public ExtElemReferenceTransformManager CreateInstance(ExtElemReferenceTransformManagerDescriptor element, Dictionary <string, object> parameters) { var elem = (ExtElemReferenceTransformManager)Activator.CreateInstance(element.Type); elem.Configure(parameters); return(elem); }
public ExtElemReferenceGUIMapPositionManager CreateInstance(ExtElemReferenceTransformManagerDescriptor element, ExtElemReference reference) { var elem = (ExtElemReferenceGUIMapPositionManager)Activator.CreateInstance(guiMapPositionManagers.Find(g => g.ForType == element.Type).GetType()); elem.Configure(reference); return(elem); }
public static void InsertDefaults(ExtElemReferenceTransformManagerDescriptor descriptor, Dictionary <string, object> into, bool overriding) { foreach (var param in descriptor.ParameterDescription) { if (!into.ContainsKey(param.Key)) { into.Add(param.Key, param.Value.DefaultValue); } else if (overriding) { into[param.Key] = param.Value.DefaultValue; } } }
private ExtElemReferenceTransformManagerDescriptor GetDescriptor(string type) { ExtElemReferenceTransformManagerDescriptor r = null; Type t = Type.GetType(type); var manager = TransformManagerDescriptorFactory.Instance.AvaliableTransformManagers.Keys.ToList().Find(k => k == t); if (manager != null) { r = TransformManagerDescriptorFactory.Instance.CreateDescriptor(manager); } return(r); }