/// <inheritdoc />
        public override object Create([NotNull] Type objectType)
        {
            if (objectType == null)
            {
                throw new ArgumentNullException(nameof(objectType));
            }

            return(_container.ResolveConfigurationType(objectType));
        }
Exemplo n.º 2
0
        public static T ResolveConfigurationType <T>([NotNull] this IComponentContext container)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            return((T)container.ResolveConfigurationType(typeof(T)));
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        public override IConversionResult Create(Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            var instance = _container.ResolveConfigurationType(type);

            return(new ConversionResult(instance));
        }