internal ConnectionTypeData(IConnectionDecorator icd) { this.identity = icd.identity; this.type = icd.type; this.color = icd.color; this.isGlobalVariable = icd.isGlobalType; this.GUILayout = icd.GUIFill; this.ObjtoString = icd.objTostring; this.StringtoObj = icd.stringtoobj; }
public static void Fetch() { types = new Dictionary <string, ConnectionTypeData>(); foreach (Assembly scriptAssembly in AppDomain.CurrentDomain.GetAssemblies().Where(res => res.FullName.Contains("Assembly-"))) { foreach (Type type in scriptAssembly.GetTypes().Where(res => !res.IsAbstract && res.IsClass && res.GetInterfaces().Contains(typeof(IConnectionDecorator)))) { IConnectionDecorator icd = scriptAssembly.CreateInstance(type.FullName) as IConnectionDecorator; if (icd != null) { types.Add(icd.identity, new ConnectionTypeData(icd)); } } } }