xtd 0.2.0
Loading...
Searching...
No Matches
trace_filter.h
Go to the documentation of this file.
1
4#pragma once
5#include "../collections/generic/list.h"
6#include "../any_object.h"
7#include "../abstract.h"
8#include "../string.h"
10#include "source_levels.h"
11#include "source_switch.h"
13
15namespace xtd {
17 namespace diagnostics {
36 public:
38
48 virtual 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 = 0;
50
51 protected:
53
56 trace_filter() = default;
58
60
68 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;
76 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;
78 };
79 }
80}
Represents text as a sequence of character units.
Definition basic_string.h:79
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:71
Provides trace event data specific to a thread and a process.
Definition trace_event_cache.h:30
Provides the base class for trace filter implementations.
Definition trace_filter.h:35
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.
trace_filter()=default
Initializes a new instance of the trace_filter class.
virtual 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=0
When overridden in a derived class, 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) noexcept
determines whether the trace listener should trace the event.
Contains xtd::diagnostics::default_trace_listener class.
#define abstract_
This keyword is used to represents an abstract class.
Definition abstract.h:25
#define core_export_
Define shared library export.
Definition core_export.h:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::diagnostics::source_levels enum class.
Contains xtd::diagnostics::source_switch class.
Contains xtd::diagnostics::trace_listener_collection class.