xtd 0.2.0
trace_filter.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "../any_object.hpp"
7#include "../abstract.hpp"
8#include "../string.hpp"
10#include "source_levels.hpp"
11#include "source_switch.hpp"
13
15namespace xtd {
17 namespace diagnostics {
35 class core_export_ trace_filter abstract_ {
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, xtd::any_object 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, xtd::any_object data1) noexcept;
78 };
79 }
80}
Contains xtd::abstract_object class.
Contains xtd::any_object class.
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:29
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:79
Provides trace event data specific to a thread and a process.
Definition trace_event_cache.hpp:29
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, xtd::any_object 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, xtd::any_object data1) noexcept
determines whether the trace listener should trace the event.
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.
Contains xtd::diagnostics::default_trace_listener class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.hpp:25
Contains xtd::collections::generic::list <value_t> class.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::diagnostics::source_levels enum class.
Contains xtd::diagnostics::source_switch class.
Contains xtd::string alias.
Contains xtd::diagnostics::trace_listener_collection class.