Beispiel #1
0
    /// <inheritdoc />
    public object Create(TypeInfo type)
    {
        if (type == null)
        {
            throw new ArgumentNullException(nameof(type));
        }

        return(_typeActivatorCache.Create <object>(_serviceProvider, type.AsType()));
    }
Beispiel #2
0
    /// <inheritdoc />
    public object CreateHandler(Type handlerType)
    {
        if (handlerType is null)
        {
            throw new ArgumentNullException(nameof(handlerType));
        }

        return(_typeActivatorCache.Create <object>(_serviceProvider, handlerType));
    }