public IGridPlugin Create(Grid grid) { IGridPlugin plugin = (IGridPlugin)Activator.CreateInstance(System.Type.GetType(Type, true, false)); plugin.ActiveGrid = grid; return(plugin); }
private IGridServer LoadGridDll(string dllName) { Assembly pluginAssembly = Assembly.LoadFrom(dllName); IGridServer server = null; foreach (Type pluginType in pluginAssembly.GetTypes()) { if (pluginType.IsPublic) { if (!pluginType.IsAbstract) { Type typeInterface = pluginType.GetInterface("IGridPlugin", true); if (typeInterface != null) { IGridPlugin plug = (IGridPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); server = plug.GetGridServer(); break; } typeInterface = null; } } } pluginAssembly = null; return(server); }
public override void Initialize(IPlugin plugin) { IGridPlugin p = plugin as IGridPlugin; p.Initialize(server); }
public int Add(IGridPlugin col) { return InnerList.Add(col); }
public int Add(IGridPlugin col) { return(InnerList.Add(col)); }