public override DmdTypeBase FullResolve()
        {
            if (IsFullyResolved)
            {
                return(this);
            }
            var returnType = ((DmdTypeBase)methodSignature.ReturnType).FullResolve();

            if ((object)returnType == null)
            {
                return(null);
            }
            var parameterTypes = DmdTypeUtilities.FullResolve(methodSignature.GetParameterTypes());

            if (parameterTypes == null)
            {
                return(null);
            }
            var varArgsParameterTypes = DmdTypeUtilities.FullResolve(methodSignature.GetVarArgsParameterTypes());

            if (varArgsParameterTypes == null)
            {
                return(null);
            }
            return((DmdTypeBase)returnType.AppDomain.MakeFunctionPointerType(methodSignature.Flags, methodSignature.GenericParameterCount, returnType, parameterTypes, varArgsParameterTypes, GetCustomModifiers()));
        }
 public DmdFunctionPointerType(DmdAppDomain appDomain, DmdMethodSignature methodSignature, IList <DmdCustomModifier> customModifiers) : base(customModifiers)
 {
     AppDomain            = appDomain ?? throw new ArgumentNullException(nameof(appDomain));
     this.methodSignature = methodSignature ?? throw new ArgumentNullException(nameof(methodSignature));
     IsFullyResolved      = ((DmdTypeBase)methodSignature.ReturnType).IsFullyResolved &&
                            DmdTypeUtilities.IsFullyResolved(methodSignature.GetParameterTypes()) &&
                            DmdTypeUtilities.IsFullyResolved(methodSignature.GetVarArgsParameterTypes());
 }