Esempio n. 1
0
        internal static TypeSignature Load(IBinaryAccessor accessor, Module module)
        {
            int elementType = accessor.ReadCompressedInteger();

            switch (elementType)
            {
            case Metadata.ElementType.Class:
                return(TypeReference.LoadClass(accessor, module));

            case Metadata.ElementType.ValueType:
                return(TypeReference.LoadValueType(accessor, module));

            case Metadata.ElementType.ByRef:
                return(ByRefType.LoadByRef(accessor, module));

            case Metadata.ElementType.Ptr:
                return(PointerType.LoadPtr(accessor, module));

            case Metadata.ElementType.FnPtr:
                return(FunctionPointer.LoadFnPtr(accessor, module));

            case Metadata.ElementType.Array:
                return(ArrayType.LoadArray(accessor, module));

            case Metadata.ElementType.SzArray:
                return(ArrayType.LoadSzArray(accessor, module));

            case Metadata.ElementType.Var:
                return(GenericParameterType.LoadVar(accessor, module));

            case Metadata.ElementType.MVar:
                return(GenericParameterType.LoadMVar(accessor, module));

            case Metadata.ElementType.GenericInst:
                return(GenericTypeReference.LoadGeneric(accessor, module));

            case Metadata.ElementType.CModOpt:
                return(CustomModifier.LoadModOpt(accessor, module));

            case Metadata.ElementType.CModReqD:
                return(CustomModifier.LoadModReq(accessor, module));

            case Metadata.ElementType.Pinned:
                return(PinnedType.LoadPinned(accessor, module));

            default:
                return(TypeReference.GetPrimitiveType(elementType, module.Assembly));
            }
        }
Esempio n. 2
0
 public virtual bool Build(ref GenericParameterType genericType)
 {
     return(false);
 }
 public virtual void Visit(GenericParameterType genericType)
 {
 }
Esempio n. 4
0
 public virtual bool Predicate(GenericParameterType genericType)
 {
     return(_defaultValue);
 }