Provides an abstract base class to create new debugging and tracing switches.
Public Aliases | |
| using | attribute_collection |
| Represents the attributes collection. | |
Public Properties | |
| auto | attributes () const noexcept -> const attribute_collection & |
| Gets the custom switch attributes. | |
| auto | attributes () noexcept -> attribute_collection & |
| Gets the custom switch attributes. | |
| auto | attributes (const attribute_collection &attributes) noexcept -> void |
| Sets the custom switch attributes. | |
| auto | description () const noexcept -> const xtd::string & |
| Gets a description of the switch. | |
| auto | display_name () const noexcept -> const xtd::string & |
| Gets a name used to identify the switch. | |
| auto | value () const noexcept -> const xtd::string & |
| Gets the value of the switch. | |
| auto | value (const xtd::string &value) -> void |
| Sets the value of the switch. | |
Public Methods | |
| auto | equals (const xtd::object &obj) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | equals (const switch_object &other) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
Protected constructors | |
| switch_object (const xtd::string &display_name, const xtd::string &description) | |
| Initializes a new instance of the switch_object class. | |
Protected Properties | |
| auto | switch_setting () const noexcept -> xtd::int32 |
| Gets the current setting for this switch. | |
| auto | switch_setting (xtd::int32 switch_setting) -> void |
| Sets the current setting for this switch. | |
Protected Methods | |
| virtual auto | get_supported_attributes () const noexcept -> xtd::array< xtd::string > |
| Gets the custom attributes supported by the switch. | |
| virtual auto | on_switch_setting_changed () -> void |
| Invoked when the switch_setting property is changed. | |
| virtual auto | on_value_changed () -> void |
| Invoked when the value property is changed. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
Represents the attributes collection.
|
protected |
Initializes a new instance of the switch_object class.
| display_name | The name of the switch. |
| description | The description for the switch. |
|
nodiscardnoexcept |
Gets the custom switch attributes.
|
nodiscardnoexcept |
Gets the custom switch attributes.
|
noexcept |
Sets the custom switch attributes.
| attributes | A xtd::collections::specialized::string_dictionary containing the case-insensitive custom attributes for the trace switch. |
|
nodiscardnoexcept |
Gets a description of the switch.
|
nodiscardnoexcept |
Gets a name used to identify the switch.
|
nodiscardnoexcept |
Gets the value of the switch.
| auto xtd::diagnostics::switch_object::value | ( | const xtd::string & | value | ) | -> void |
Sets the value of the switch.
| value | A string representing the value of the switch. |
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
Implements xtd::iequatable< xtd::diagnostics::switch_object >.
|
nodiscardprotectednoexcept |
Gets the current setting for this switch.
|
protected |
Sets the current setting for this switch.
| switch_setting | The current setting for this switch. The default is zero. |
|
nodiscardprotectedvirtualnoexcept |
Gets the custom attributes supported by the switch.
|
protectedvirtual |
Invoked when the switch_setting property is changed.
Reimplemented in xtd::diagnostics::trace_switch.
|
protectedvirtual |
Invoked when the value property is changed.
Reimplemented in xtd::diagnostics::boolean_switch, xtd::diagnostics::source_switch, and xtd::diagnostics::trace_switch.