System.Reflection.EventInfo.GetRaiseMethod C# (CSharp) Method

GetRaiseMethod() public method

public GetRaiseMethod ( ) : MethodInfo
return MethodInfo
        public MethodInfo GetRaiseMethod() { return GetRaiseMethod(false); }

Same methods

EventInfo::GetRaiseMethod ( bool nonPublic ) : MethodInfo

Usage Example

Beispiel #1
0
        /// <summary>
        /// Verifies that two events are equivalent.
        /// </summary>
        /// <param name="actual">The actual event information.</param>
        /// <param name="expected">The expected event information.</param>
        /// <param name="isExplicit">A value indicating whether the actual event is implemented explicitly.</param>
        public static void AreEquivalent(EventInfo actual, EventInfo expected, bool isExplicit)
        {
            Assert.That(actual, Is.Not.Null);
            Assert.That(expected, Is.Not.Null);

            // Check member properties.
            AreMembersEquivalent(actual, expected);

            // Check event properties.
            Assert.That(actual.Attributes, Is.EqualTo(expected.Attributes));
            Assert.That(actual.IsMulticast, Is.EqualTo(expected.IsMulticast));
            Assert.That(actual.IsSpecialName, Is.EqualTo(expected.IsSpecialName));

            // Check event handler type.
            AreTypesEquivalent(actual.EventHandlerType, expected.EventHandlerType);

            // Check event methods.
            InternalAreEquivalent(actual.GetAddMethod(), expected.GetAddMethod(), isExplicit);
            InternalAreEquivalent(actual.GetRemoveMethod(), expected.GetRemoveMethod(), isExplicit);
            InternalAreEquivalent(actual.GetRaiseMethod(), expected.GetRaiseMethod(), isExplicit);
        }
All Usage Examples Of System.Reflection.EventInfo::GetRaiseMethod