Exemple #1
0
        public void Register <T>(Identifier id, IService service)
        {
            var type = typeof(T);

            if (CheckDuplicatedClass(type, id))
            {
                throw new Exception($"Tried to re-register a class of type '{type.GetFriendlyName()}' with ID '{id}'");
            }

            services.GetOrInsertNew(type).Add(id, service);
        }