ModelBuilder.ValueGeneratorBase.VerifyGenerateRequest C# (CSharp) Method

VerifyGenerateRequest() protected method

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

            if (IsSupported(type, referenceName, buildChain) == false)
            {
                var message = string.Format(
                    CultureInfo.CurrentCulture,
                    Resources.Error_TypeNotSupportedFormat,
                    GetType().FullName,
                    type.FullName);

                throw new NotSupportedException(message);
            }
        }