System.Reflection.MetadataImport.GetAssociatesCount C# (CSharp) Method

GetAssociatesCount() public method

public GetAssociatesCount ( int mdPropEvent ) : int
mdPropEvent int
return int
        public int GetAssociatesCount(int mdPropEvent) 
        {
            return EnumCount((int)MetadataTokenType.MethodDef, mdPropEvent);
        }

Usage Example

        internal unsafe RuntimePropertyInfo(int tkProperty, RuntimeType declaredType, RuntimeType.RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            RuntimeMethodInfo info;
            MetadataImport    metadataImport = declaredType.GetRuntimeModule().MetadataImport;

            this.m_token = tkProperty;
            this.m_reflectedTypeCache = reflectedTypeCache;
            this.m_declaringType      = declaredType;
            metadataImport.GetPropertyProps(tkProperty, out this.m_utf8name, out this.m_flags, out MetadataArgs.Skip.ConstArray);
            int associatesCount     = metadataImport.GetAssociatesCount(tkProperty);
            AssociateRecord *result = (AssociateRecord *)stackalloc byte[(((IntPtr)associatesCount) * sizeof(AssociateRecord))];

            metadataImport.GetAssociates(tkProperty, result, associatesCount);
            Associates.AssignAssociates(result, associatesCount, declaredType, reflectedTypeCache.RuntimeType, out info, out info, out info, out this.m_getterMethod, out this.m_setterMethod, out this.m_otherMethod, out isPrivate, out this.m_bindingFlags);
        }
All Usage Examples Of System.Reflection.MetadataImport::GetAssociatesCount