Added initial documentation tree using doxygen. More tweaks on the license text ensur...
[lwes-dotnet/github-mirror.git] / Org.Lwes / Config / DiagnosticsConfigurationElement.cs
blob3cefeaf324e11fb18d03e82a4193f78ef3e3392c
1 #region Header
3 //
4 // This file is part of the LWES .NET Binding (LWES.net)
5 //
6 // COPYRIGHT© 2009, Phillip Clark (cerebralkungfu[at*g mail[dot*com)
7 // original .NET implementation
8 //
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/>.
23 #endregion Header
25 namespace Org.Lwes.Config
27 using System.Configuration;
29 /// <summary>
30 /// Configuration section for LWES specific diagnostics settings.
31 /// </summary>
32 public sealed class DiagnosticsConfigurationElement : ConfigurationElement
34 #region Fields
36 /// <summary>
37 /// Default value indicating unknown.
38 /// </summary>
39 public const string DefaultValue_unknown = "unknown";
41 /// <summary>
42 /// Property name for component.
43 /// </summary>
44 public const string PropertyName_component = "component";
46 /// <summary>
47 /// Property name for defaultTraceSource.
48 /// </summary>
49 public const string PropertyName_defaultTraceSource = "defaultTraceSource";
51 /// <summary>
52 /// Property name for environment.
53 /// </summary>
54 public const string PropertyName_environment = "environment";
56 #endregion Fields
58 #region Properties
60 /// <summary>
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.
64 /// </summary>
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; }
73 /// <summary>
74 /// For systems using the LWES Diagnostics utility class, determines the default
75 /// trace source.
76 /// </summary>
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; }
86 /// <summary>
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.
92 /// </summary>
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