GetAssociatesCount() public method

public GetAssociatesCount ( int mdPropEvent ) : int
mdPropEvent int
return int
        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);
        }
        internal unsafe RuntimeEventInfo(int tkEvent, RuntimeType declaredType, RuntimeType.RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            RuntimeMethodInfo info;
            MetadataImport    metadataImport = declaredType.GetRuntimeModule().MetadataImport;

            this.m_token = tkEvent;
            this.m_reflectedTypeCache = reflectedTypeCache;
            this.m_declaringType      = declaredType;
            RuntimeType runtimeType = reflectedTypeCache.RuntimeType;

            metadataImport.GetEventProps(tkEvent, out this.m_utf8name, out this.m_flags);
            int associatesCount     = metadataImport.GetAssociatesCount(tkEvent);
            AssociateRecord *result = (AssociateRecord *)stackalloc byte[(((IntPtr)associatesCount) * sizeof(AssociateRecord))];

            metadataImport.GetAssociates(tkEvent, result, associatesCount);
            Associates.AssignAssociates(result, associatesCount, declaredType, runtimeType, out this.m_addMethod, out this.m_removeMethod, out this.m_raiseMethod, out info, out info, out this.m_otherMethod, out isPrivate, out this.m_bindingFlags);
        }