ModelBuilder.TypeCreatorBase.VerifyPopulateRequest C# (CSharp) Method

VerifyPopulateRequest() protected method

Verifies that the minimum required information has been provided in order to populate an instance.
The parameter is null. This generator does not support creating the requested value.
protected VerifyPopulateRequest ( Type type, string referenceName, LinkedList buildChain ) : void
type System.Type The type to evaluate.
referenceName string Identifies the possible parameter or property name the instance is intended for.
buildChain LinkedList The chain of instances built up to this point.
return void
        protected virtual void VerifyPopulateRequest(Type type, string referenceName, LinkedList<object> buildChain)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            if (CanPopulate(type, referenceName, buildChain))
            {
                return;
            }

            var message = string.Format(CultureInfo.CurrentCulture, Resources.Error_TypeNotSupportedFormat,
                GetType().FullName, type.FullName);

            throw new NotSupportedException(message);
        }