Пример #1
0
        private void Unload(Type type, Identifier id)
        {
            if (services.ContainsKey(type))
            {
                if (services[type].ContainsKey(id))
                {
                    var service = services[type][id];

                    if (service is IServiceUnload unload)
                    {
                        unload.Unload();
                    }

                    services[type].Remove(id);

                    if (services[type].Count == 0)
                    {
                        services.Remove(type);
                    }
                }
            }
        }