Dispose() public méthode

public Dispose ( ) : void
Résultat void
Exemple #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();
        }
Exemple #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();
        }