Пример #1
0
//        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>();
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void Initialize(RegionInfoStructure currentRegion)
 {
     CurrentRegion = currentRegion;
     HookupEvents();
 }
Пример #4
0
 public void Initialize(RegionInfoStructure currentRegion)
 {
     CurrentRegion = currentRegion;
 }