4 // This file is part of the LWES .NET Binding (LWES.net)
6 // COPYRIGHT© 2009, Phillip Clark (cerebralkungfu[at*g mail[dot*com)
7 // original .NET implementation
9 // LWES.net is free software: you can redistribute it and/or modify
10 // it under the terms of the Lesser GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
14 // LWES.net is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // Lesser GNU General Public License for more details.
19 // You should have received a copy of the Lesser GNU General Public License
20 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
25 namespace Org
.Lwes
.Config
27 using System
.Configuration
;
30 /// Configuration section for LWES specific diagnostics settings.
32 public sealed class DiagnosticsConfigurationElement
: ConfigurationElement
37 /// Default value indicating unknown.
39 public const string DefaultValue_unknown
= "unknown";
42 /// Property name for component.
44 public const string PropertyName_component
= "component";
47 /// Property name for defaultTraceSource.
49 public const string PropertyName_defaultTraceSource
= "defaultTraceSource";
52 /// Property name for environment.
54 public const string PropertyName_environment
= "environment";
61 /// Indicates the name of the component that the current application represents.
62 /// The meaning of "component" is up to the user but in general indicates a
63 /// role that an application performs within a system.
65 [ConfigurationProperty(DiagnosticsConfigurationElement
.PropertyName_component
66 , DefaultValue
= DiagnosticsConfigurationElement
.DefaultValue_unknown
)]
67 public string Component
69 get { return (string)this[PropertyName_component]; }
70 set { this[PropertyName_component] = value; }
74 /// For systems using the LWES Diagnostics utility class, determines the default
77 /// <seealso cref="System.Diagnostics.TraceSource"/>
78 [ConfigurationProperty(DiagnosticsConfigurationElement
.PropertyName_defaultTraceSource
79 , DefaultValue
= DiagnosticsConfigurationElement
.DefaultValue_unknown
)]
80 public string DefaultTraceSource
82 get { return (string)this[PropertyName_defaultTraceSource]; }
83 set { this[PropertyName_defaultTraceSource] = value; }
87 /// Indicates the name of the environment in which the application is executing.
88 /// The meaning of "environment" is up to the user but in general indicates an
89 /// environment such as: { dev | test | staging | production }. In cases where
90 /// events in one environment can be heard by journalers in another environment
91 /// the presence of this value in an event helps with filtering.
93 [ConfigurationProperty(DiagnosticsConfigurationElement
.PropertyName_environment
94 , DefaultValue
= DiagnosticsConfigurationElement
.DefaultValue_unknown
)]
95 public string Environment
97 get { return (string)this[PropertyName_environment]; }
98 set { this[PropertyName_environment] = value; }
101 #endregion Properties