Пример #1
0
        public DIHelper TryAddTransient <TService>() where TService : class
        {
            var serviceName = $"{typeof(TService)}";

            if (!Transient.Contains(serviceName))
            {
                Transient.Add(serviceName);
                ServiceCollection.TryAddTransient <TService>();
            }

            return(this);
        }