Provides a multilevel switch to control tracing and debug output without recompiling your code.
Protected Member Functions | |
| void | on_value_changed () override | 
| Invoked when the value of the value property changes.   | |
  Protected Member Functions inherited from xtd::diagnostics::switch_base | |
| switch_base (const xtd::string &display_name, const xtd::string &description) | |
| Initializes a new instance of the switch_base class.   | |
| switch_base (const xtd::string &display_name, const xtd::string &description, const xtd::string &default_switch_value) | |
| Initializes a new instance of the switch_base class.   | |
| int32 | switch_setting () const noexcept | 
| Gets the current setting for this switch.   | |
| void | switch_setting (int32 switch_setting) | 
| Sets the current setting for this switch.   | |
| const xtd::string & | value () const noexcept | 
| Gets the value of the switch.   | |
| void | value (const xtd::string &value) | 
| Sets the value of the switch.   | |
| virtual std::vector< xtd::string > | get_supported_attributes () const noexcept | 
| Gets the custom attributes supported by the switch.   | |
| virtual void | on_switch_setting_changed () | 
| Invoked when the switch_setting property is changed.   | |
Public Constructors | |
| source_switch (const xtd::string &name) | |
| Initializes a new instance of the source_switch class, specifying the name of the source.   | |
| source_switch (const xtd::string &display_name, const xtd::string &default_switch_value) | |
| Initializes a new instance of the source_switch class, specifying the display name and the default value for the source switch.   | |
Public Properties | |
| xtd::diagnostics::source_levels | level () const noexcept | 
| Gets the level of the switch.   | |
| void | level (xtd::diagnostics::source_levels level) | 
| Sets the level of the switch.   | |
Public Methods | |
| bool | should_trace (xtd::diagnostics::trace_event_type event_type) noexcept | 
| Determines if trace listeners should be called, based on the trace event type.   | |
Additional Inherited Members | |
  Public Member Functions inherited from xtd::diagnostics::switch_base | |
| const std::map< xtd::string, xtd::string > & | attributes () const noexcept | 
| Gets the custom switch attributes.   | |
| std::map< xtd::string, xtd::string > & | attributes () noexcept | 
| Gets the custom switch attributes.   | |
| void | attributes (const std::map< xtd::string, xtd::string > &attributes) noexcept | 
| Sets the custom switch attributes.   | |
| const xtd::string & | description () const noexcept | 
| Gets a description of the switch.   | |
| const xtd::string & | display_name () const noexcept | 
| Gets a name used to identify the switch.   | |
| bool | equals (const switch_base &value) const noexcept override | 
| virtual bool | equals (const object &obj) const noexcept | 
| Determines whether the specified object is equal to the current object.   | |
  Public Member Functions inherited from xtd::object | |
| object ()=default | |
| Create a new instance of the ultimate base class 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.   | |
  Public Member Functions inherited from xtd::iequatable< switch_base > | |
| virtual bool | equals (const switch_base &) const noexcept=0 | 
| Indicates whether the current object is equal to another object of the same type.   | |
  Static Public Member Functions inherited from xtd::diagnostics::switch_base | |
| 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.   | |
  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.   | |
      
  | 
  explicit | 
Initializes a new instance of the source_switch class, specifying the name of the source.
| name | The name of the source. | 
| xtd::diagnostics::source_switch::source_switch | ( | const xtd::string & | display_name, | 
| const xtd::string & | default_switch_value | ||
| ) | 
Initializes a new instance of the source_switch class, specifying the display name and the default value for the source switch.
| display_name | The name of the source. | 
| default_switch_value | The default value for the switch. | 
      
  | 
  noexcept | 
Gets the level of the switch.
| void xtd::diagnostics::source_switch::level | ( | xtd::diagnostics::source_levels | level | ) | 
Sets the level of the switch.
| level | One of the SourceLevels values that represents the event level of the switch. | 
      
  | 
  noexcept | 
Determines if trace listeners should be called, based on the trace event type.
| event_type | One of the trace_event_type values. | 
      
  | 
  overrideprotectedvirtual | 
Invoked when the value of the value property changes.
Reimplemented from xtd::diagnostics::switch_base.