Beispiel #1
0
 private void unregister()
 {
     lock (lck) {
         numberOfInstances--;
         if (numberOfInstances <= 0x00)
         {
             Unloader.DeleteBuffer(ref dataBuff);
         }
     }
 }
Beispiel #2
0
        void IIoCRegistration.Unload(object instance)
        {
            if (Unloader != null)
            {
                var typedInstance = (T)instance;
                Unloader.Invoke(typedInstance);
            }

            (instance as IDisposable)?.Dispose();
        }
Beispiel #3
0
 private void unregister()
 {
     lock (lck) {
         numberOfInstances--;
         if (numberOfInstances <= 0x00)
         {
             Unloader.DeleteBuffer(ref xntBuff);
             Unloader.DeleteTexture(texBuff);
         }
     }
 }
        public IDisposable UnloadIndex(string indexName)
        {
            var unloader = new Unloader(indexName, _unloadedIndices);

            try
            {
                RemoveResources(indexName);

                if (_mappings.ContainsKey(indexName))
                {
                    _mappings.TryRemove(indexName, out MappingResource mapping);
                }

                return(unloader);
            }
            catch (Exception ex)
            {
                unloader.Dispose();
                throw new Exception($"Error on unloading index { indexName }", ex);
            }
        }
Beispiel #5
0
        public string Start(string assembly, string clazz, IHost host, IWorld world, UUID id, string name, Unloader unloader, string[] args)
        {
            m_scheduler = new MicroScheduler();
            _unloader = unloader;
            AppDomain.CurrentDomain.UnhandledException += (sender, exceptionArgs) => Kill(exceptionArgs.ExceptionObject as Exception);

            try {
                m_id = id;
                m_name = name;
                m_mrm = (MRMBase)Activator.CreateInstanceFrom(assembly, clazz).Unwrap();
                m_world = new SandboxedWorld(world);
                m_host = new SandboxedHost(host, m_world.Objects, m_scheduler);
                m_mrm.InitMiniModule(m_world, m_host, id);
                m_mrm.Start(args);
            } catch (Exception e) {
                return FullError(e);
            }
            return null;
        }
Beispiel #6
0
 void Start()
 {
     unloader = GetComponent("Unloader") as Unloader;
     (new Thread(startStuff)).Start();
 }
Beispiel #7
0
 void Start()
 {
     unloader = GetComponent("Unloader") as Unloader;
     (new Thread(startStuff)).Start();
 }
Beispiel #8
0
 public void Post([FromBody] Unloader unloader)
 {
 }