// private static bool haveInitialized = false; public DotNetEngine() { RegionInfo = new RegionInfoStructure(); RegionInfo.Compilers = Compilers; RegionInfo.Schedulers = Schedulers; RegionInfo.Executors = new Dictionary <string, IScriptExecutor>(); RegionInfo.CommandProviders = new Dictionary <string, IScriptCommandProvider>(); RegionInfo.EventProviders = new Dictionary <string, IScriptEventProvider>(); }
private readonly static string nameIScriptEngineRegionComponent = typeof(IScriptEngineRegionComponent).Name; // keep interface name in managed code public static IScriptEngineComponent GetComponentInstance(RegionInfoStructure info, string name, params Object[] args) { IScriptEngineComponent c = GetComponentInstance(name, args); // If module is IScriptEngineRegionComponent then it will have one instance per region and we will initialize it if (c.GetType().GetInterface(nameIScriptEngineRegionComponent) != null) { ((IScriptEngineRegionComponent)c).Initialize(info); } return(c); }
public void Initialize(RegionInfoStructure currentRegion) { CurrentRegion = currentRegion; HookupEvents(); }
public void Initialize(RegionInfoStructure currentRegion) { CurrentRegion = currentRegion; }