Пример #1
0
            public GenericTypeRefResolver(TypeRefResolver baseResolver, TypeRefBuilder[] genericArgs)
            {
                _baseResolver = baseResolver;
                _genericArgs  = genericArgs;

                if (genericArgs.Length == 0)
                {
                    throw new WeavingException("No generic arguments supplied");
                }
            }
Пример #2
0
            public ArrayTypeRefResolver(TypeRefResolver baseResolver, int rank)
                : base(baseResolver)
            {
                _rank = rank;

                if (rank < 1)
                {
                    throw new WeavingException($"Invalid array rank: {rank}, must be at least 1");
                }
            }
Пример #3
0
 public TypeRefBuilder(ModuleDefinition module, GenericParameterType genericParameterType, int genericParameterIndex)
 {
     _module   = module;
     _resolver = new GenericParameterTypeRefResolver(genericParameterType, genericParameterIndex);
 }
Пример #4
0
 public TypeRefBuilder(ModuleDefinition module, TypeReference typeRef)
 {
     _module   = module;
     _resolver = new ConstantTypeRefResolver(typeRef);
 }
Пример #5
0
 public void MakeGenericType(TypeRefBuilder[] genericArgs)
 => _resolver = new GenericTypeRefResolver(_resolver, genericArgs);
Пример #6
0
 public void MakeArrayType(int rank)
 => _resolver = new ArrayTypeRefResolver(_resolver, rank);
Пример #7
0
 public void MakeByRefType()
 => _resolver = new ByRefTypeRefResolver(_resolver);
Пример #8
0
 public void MakePointerType()
 => _resolver = new PointerTypeRefResolver(_resolver);
Пример #9
0
 public PointerTypeRefResolver(TypeRefResolver baseResolver)
     : base(baseResolver)
 {
 }
Пример #10
0
 public ByRefTypeRefResolver(TypeRefResolver baseResolver)
     : base(baseResolver)
 {
 }
Пример #11
0
 protected TypeSpecTypeRefResolver(TypeRefResolver baseResolver)
 => _baseResolver = baseResolver;