public unsafe PropertyProps GetPropertyProps(uint propertyToken)
        {
            PropertyProps propertyProps = new PropertyProps();

            propertyProps.Token = propertyToken;
            propertyProps.Name  =
                Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) {
                uint sigBlobSize;
                metaData.GetPropertyProps(propertyProps.Token,
                                          out propertyProps.ClassToken,
                                          pString, pStringLenght, out stringLenght,
                                          out propertyProps.Flags,
                                          IntPtr.Zero,                                                        //new IntPtr(&pSigBlob),
                                          out sigBlobSize,
                                          out propertyProps.TypeKind,
                                          out propertyProps.DefaultValue,
                                          out propertyProps.DefaultValueSize,
                                          out propertyProps.Setter,
                                          out propertyProps.Getter,
                                          out propertyProps.OtherMethods,
                                          2,
                                          out propertyProps.OtherMethodNumTokens);
            });
            return(propertyProps);
        }
Exemple #2
0
        public PropertyProps GetPropertyProps(uint prop)
        {
            PropertyProps ret        = new PropertyProps();
            IntPtr        sigPtr     = IntPtr.Zero;
            uint          sigSize    = 0;
            IntPtr        defValPtr  = IntPtr.Zero;
            uint          defValSize = 0;

            ret.Propery = prop;
            ret.Name    = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) {
                uint unused;
                metaData.GetPropertyProps(
                    ret.Propery,
                    out ret.DeclaringClass,
                    pString, pStringLenght, out stringLenght,
                    out ret.Flags,
                    out sigPtr,
                    out sigSize,
                    out ret.CPlusTypeFlag,
                    out defValPtr,
                    out defValSize,
                    out ret.SetterMethod,
                    out ret.GetterMethod,
                    null, 0, out unused                     // TODO
                    );
            });
            ret.SigBlob      = new Blob(sigPtr, sigSize);
            ret.DefaultValue = new Blob(defValPtr, defValSize);
            return(ret);
        }
Exemple #3
0
		MethodInfo GetSetMethod(PropertyProps p)
		{
			return new MethodInfo(this,module.MetaData.GetMethodProps(p.Setter));
		}