Exemplo n.º 1
0
        public static int GetCallbackIdentity(Type callbackStruct)
        {
            object[] customAttributes = callbackStruct.GetCustomAttributes(typeof(CallbackIdentityAttribute), inherit: false);
            int      num = 0;

            if (num < customAttributes.Length)
            {
                CallbackIdentityAttribute callbackIdentityAttribute = (CallbackIdentityAttribute)customAttributes[num];
                return(callbackIdentityAttribute.Identity);
            }
            throw new Exception("Callback number not found for struct " + callbackStruct);
        }