public virtual bool Predicate(PinnedType pinnedType) { if (_defaultValue != Predicate(pinnedType.ElementType)) { return(!_defaultValue); } return(_defaultValue); }
public virtual bool Build(ref PinnedType pinnedType) { var elementType = pinnedType.ElementType; if (!Build(ref elementType)) { return(false); } pinnedType = new PinnedType(elementType); return(true); }
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)); } }
public virtual void Visit(PinnedType pinnedType) { Visit(pinnedType.ElementType); }