Class EventCodeAttribute
Indicates that the attributed class contains event code native.
[AttributeUsage(AttributeTargets.Class)]
public sealed class EventCodeAttribute : Attribute
- Inheritance
-
EventCodeAttribute
- Inherited Members
Constructors
EventCodeAttribute(EventCodeNative)
Initializes a new instance of the EventCodeAttribute class.
public EventCodeAttribute(EventCodeNative eventCode)
Parameters
eventCode
EventCodeNativeThe native event code.
Properties
EventCode
Gets native event code.
public EventCodeNative EventCode { get; }
Property Value
Methods
GetEventCode(Type)
Gets native event code from specified type.
public static EventCodeNative GetEventCode(Type type)
Parameters
type
TypeThe specified type.
Returns
- EventCodeNative
Returns native event code.
Exceptions
- ArgumentException
If specified type has no EventCodeAttribute.
GetEventCodes(params Type[])
Gets native event codes from specified types.
public static IEnumerable<EventCodeNative> GetEventCodes(params Type[] types)
Parameters
types
Type[]The specified types.
Returns
- IEnumerable<EventCodeNative>
Returns set containing native event codes.
Exceptions
- ArgumentException
If one on the specified type has no EventCodeAttribute.