Пример #1
0
 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());
 }
 public DmdGenericInstanceType(DmdTypeDef genericTypeDefinition, IList <DmdType> typeArguments, IList <DmdCustomModifier> customModifiers) : base(customModifiers)
 {
     if ((object)genericTypeDefinition == null)
     {
         throw new ArgumentNullException(nameof(genericTypeDefinition));
     }
     if (typeArguments == null)
     {
         throw new ArgumentNullException(nameof(typeArguments));
     }
     if (genericTypeDefinition.GetGenericArguments().Count != typeArguments.Count)
     {
         throw new ArgumentException();
     }
     this.genericTypeDefinition = genericTypeDefinition;
     this.typeArguments         = ReadOnlyCollectionHelpers.Create(typeArguments);
     IsFullyResolved            = DmdTypeUtilities.IsFullyResolved(typeArguments);
 }