CapyKit/Documentation/Help/T_CapyKit_CapyEventReporter.md

2.1 KiB

CapyEventReporter Class

The CapyEventReporter class is responsible for managing event subscriptions and emissions within CapyKit.

Definition

Namespace: CapyKit
Assembly: CapyKit (in CapyKit.dll) Version: 1.0.0+735d7c4c91a8ae04c2d8cae4ce85ddf4909e5b7d

C#

public static class CapyEventReporter

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
type CapyEventReporter = class end
InheritanceObject → CapyEventReporter

Remarks

Because consumers of CapyKit may have varied ways of handling logging, the CapyEventReporter provides a way for subscribers to recieve events for various "events" within the library. These can be thought of as a logging solution for CapyKit. Consumers are free to treat these events however they see fit.

Constructors

CapyEventReporter  

Methods

EmitEvent Emits an event with the given severity level, message, and method name.
EmitEventOnce Emits an event with the given severity level, message, unique identifier, and method name one time.
Subscribe Subscribes the specified event handler to the event with the given subscription level and origin.
Unsubscribe Unsubscribes the specified event handler from the event with the given origin.

Fields

uniqueIdentifiers A hash set storing unique identifiers for events intended to only be emitted once.

See Also

Reference

CapyKit Namespace