Inheritance: IDisposable
Exemplo n.º 1
0
        public static IronConsole GetConsoleForRuntime(IronRuntime runtime)
        {
            var hiveId = runtime.IronHive.Id;
            IronConsole console;
            if (!_hiveConsoles.TryGetValue(hiveId, out console) || console.IsDisposed)
            {
                console = new IronConsole(runtime);
                _hiveConsoles[hiveId] = console;
            }

            return console;
        }
Exemplo n.º 2
0
        public static IronConsole GetConsoleForRuntime(IronRuntime runtime)
        {
            var         hiveId = runtime.IronHive.Id;
            IronConsole console;

            if (!_hiveConsoles.TryGetValue(hiveId, out console) || console.IsDisposed)
            {
                console = new IronConsole(runtime);
                _hiveConsoles[hiveId] = console;
            }

            return(console);
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     if (!IsDisposed)
     {
         IsDisposed = true;
         if (IronHive != null)
         {
             IronHive.Close();
         }
         if (_console != null)
         {
             _console.Dispose();
             _console = null;
         }
         LivingRuntimes.Remove(_hiveId);
     }
 }