xtd 0.2.0
Loading...
Searching...
No Matches
xtd::diagnostics::event_type_filter Class Reference
Inheritance diagram for xtd::diagnostics::event_type_filter:
xtd::diagnostics::trace_filter xtd::abstract_object xtd::object

Definition

Indicates whether a listener should trace based on the event type.

Indicates whether a listener should trace based on the event type.
Definition event_type_filter.h:29
Provides the base class for trace filter implementations.
Definition trace_filter.h:35
#define core_export_
Define shared library export.
Definition core_export.h:13
Inheritance
xtd::objectxtd::abstract_objectxtd::diagnostics::trace_filterxtd::diagnostics::event_type_filter
Header
#include <xtd/diagnostics/event_type_filter>
Namespace
xtd::diagnostics
Library
xtd.core
Remarks
One of several different types of filters can be assigned to a trace listener through the xtd::diagnostics::trace_listener::filter property to provide a layer of screening beyond that provided by the xtd::diagnostics::trace_switch. The filter can be used to control the event types that are produced by the listener.
This class filters events based on the value of the xtd::diagnostics::event_type_filter::event_type property. This property can be set by code to specify the event type of messages that should be traced by the listener. The value of the property indicates the threshold at which to begin tracing. Event types at and above the specified level are traced. The xtd::diagnostics::event_type_filter::should_trace method, called by listeners to determine if an event should be traced, uses the value of the xtd::diagnostics::event_type_filter::event_type property.

Public Constructors

 event_type_filter (xtd::diagnostics::source_levels level)
 Initializes a new instance of the event_type_filter class.
 

Public Properties

xtd::diagnostics::source_levels event_type () const noexcept
 Gets the event type of the messages to trace.
 
void event_type (xtd::diagnostics::source_levels level) noexcept
 Sets the event type of the messages to trace.
 

Public Methods

bool should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::string &source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::string &message, std::any data1, const xtd::collections::generic::list< xtd::any_object > &data_array) noexcept override
 Determines whether the trace listener should trace the event.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::diagnostics::trace_filter
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 
- Protected Member Functions inherited from xtd::diagnostics::trace_filter
 trace_filter ()=default
 Initializes a new instance of the trace_filter class.
 
bool should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::string &source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::string &message) noexcept
 determines whether the trace listener should trace the event.
 
bool should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::string &source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::string &message, std::any data1) noexcept
 determines whether the trace listener should trace the event.
 
- Protected Member Functions inherited from xtd::abstract_object
 abstract_object ()=default
 Initializes a new instance of the xtd::abstract_object class.
 

The documentation for this class was generated from the following file: