Dispose() публичный Метод

public Dispose ( ) : void
Результат void
Пример #1
0
        public static void UnregisterHost(IHost host)
        {
            Log.WriteInfo("Unregistering host of type {0}", host.GetType());
            HostManager managerToDispose = null;

            lock (_registrations)
            {
                if (_registrations.ContainsKey(host))
                {
                    managerToDispose = _registrations[host];
                    _registrations.Remove(host);
                }
            }
            managerToDispose?.Dispose();
        }
Пример #2
0
        public static void UnregisterHost(IHost host)
        {
            HostManager managerToDispose = null;

            lock (_registrations)
            {
                if (_registrations.ContainsKey(host))
                {
                    managerToDispose = _registrations[host];
                    _registrations.Remove(host);
                }
            }

            managerToDispose?.Dispose();
        }