Exemple #1
0
        public FieldProps GetFieldProps(uint fieldDef)
        {
            FieldProps ret       = new FieldProps();
            IntPtr     sigPtr    = IntPtr.Zero;
            uint       sigSize   = 0;
            IntPtr     constPtr  = IntPtr.Zero;
            uint       constSize = 0;

            ret.Token = fieldDef;
            ret.Name  = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) {
                metaData.GetFieldProps(
                    ret.Token,
                    out ret.DeclaringClass,
                    pString, pStringLenght, out stringLenght,                     // The string to get
                    out ret.Flags,
                    out sigPtr,
                    out sigSize,
                    out ret.CPlusTypeFlag,
                    out constPtr,                     // TODO: What is this?
                    out constSize
                    );
            });
            ret.SigBlob       = new Blob(sigPtr, sigSize);
            ret.ConstantValue = new Blob(constPtr, constSize);
            return(ret);
        }
        public FieldProps GetFieldProps(uint fieldToken)
        {
            FieldProps fieldProps = new FieldProps();

            fieldProps.Token = fieldToken;
            fieldProps.Name  =
                Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) {
                uint unused;
                IntPtr unusedPtr = IntPtr.Zero;
                metaData.GetFieldProps(fieldProps.Token,
                                       out fieldProps.ClassToken,
                                       pString, pStringLenght, out stringLenght,                         // The string to get
                                       out fieldProps.Flags,
                                       IntPtr.Zero,
                                       out unused,
                                       out unused,
                                       out unusedPtr,
                                       out unused);
            });

            return(fieldProps);
        }
Exemple #3
0
		internal FieldInfo(DebugType declaringType, FieldProps fieldProps):base (declaringType)
		{
			this.fieldProps = fieldProps;
		}