Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / Diagnostics / TraceSection.cs / 1 / TraceSection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System.Configuration;
namespace System.Diagnostics {
internal class TraceSection : ConfigurationElement {
private static readonly ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propListeners = new ConfigurationProperty("listeners", typeof(ListenerElementsCollection), new ListenerElementsCollection(), ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propAutoFlush = new ConfigurationProperty("autoflush", typeof(bool), false, ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propIndentSize = new ConfigurationProperty("indentsize", typeof(int), 4, ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propUseGlobalLock = new ConfigurationProperty("useGlobalLock", typeof(bool), true, ConfigurationPropertyOptions.None);
static TraceSection() {
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propListeners);
_properties.Add(_propAutoFlush);
_properties.Add(_propIndentSize);
_properties.Add(_propUseGlobalLock);
}
[ConfigurationProperty( "autoflush", DefaultValue=false )]
public bool AutoFlush {
get {
return (bool) this[_propAutoFlush];
}
}
[ConfigurationProperty( "indentsize", DefaultValue=4 )]
public int IndentSize {
get {
return (int) this[_propIndentSize];
}
}
[ConfigurationProperty( "listeners" )]
public ListenerElementsCollection Listeners {
get {
return (ListenerElementsCollection) this[_propListeners];
}
}
[ConfigurationProperty( "useGlobalLock", DefaultValue = true)]
public bool UseGlobalLock {
get {
return (bool) this[_propUseGlobalLock];
}
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System.Configuration;
namespace System.Diagnostics {
internal class TraceSection : ConfigurationElement {
private static readonly ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propListeners = new ConfigurationProperty("listeners", typeof(ListenerElementsCollection), new ListenerElementsCollection(), ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propAutoFlush = new ConfigurationProperty("autoflush", typeof(bool), false, ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propIndentSize = new ConfigurationProperty("indentsize", typeof(int), 4, ConfigurationPropertyOptions.None);
private static readonly ConfigurationProperty _propUseGlobalLock = new ConfigurationProperty("useGlobalLock", typeof(bool), true, ConfigurationPropertyOptions.None);
static TraceSection() {
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propListeners);
_properties.Add(_propAutoFlush);
_properties.Add(_propIndentSize);
_properties.Add(_propUseGlobalLock);
}
[ConfigurationProperty( "autoflush", DefaultValue=false )]
public bool AutoFlush {
get {
return (bool) this[_propAutoFlush];
}
}
[ConfigurationProperty( "indentsize", DefaultValue=4 )]
public int IndentSize {
get {
return (int) this[_propIndentSize];
}
}
[ConfigurationProperty( "listeners" )]
public ListenerElementsCollection Listeners {
get {
return (ListenerElementsCollection) this[_propListeners];
}
}
[ConfigurationProperty( "useGlobalLock", DefaultValue = true)]
public bool UseGlobalLock {
get {
return (bool) this[_propUseGlobalLock];
}
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ReadOnlyCollection.cs
- FillRuleValidation.cs
- EndpointConfigContainer.cs
- InputBindingCollection.cs
- ComplexPropertyEntry.cs
- CatalogPartChrome.cs
- TimeEnumHelper.cs
- HttpCachePolicy.cs
- StylusPointProperties.cs
- SignatureHelper.cs
- StandardCommands.cs
- CommonXSendMessage.cs
- SR.cs
- DropDownList.cs
- SQLGuid.cs
- RelationshipEndMember.cs
- XsdBuildProvider.cs
- EntityModelBuildProvider.cs
- SyndicationSerializer.cs
- DataGridViewCellValueEventArgs.cs
- ToolboxItemFilterAttribute.cs
- ExtentKey.cs
- WindowsAuthenticationModule.cs
- UpdatePanelTrigger.cs
- ProfileServiceManager.cs
- ColorPalette.cs
- LogLogRecordHeader.cs
- WebPartAuthorizationEventArgs.cs
- ParseHttpDate.cs
- DependencyPropertyChangedEventArgs.cs
- DetailsViewInsertedEventArgs.cs
- objectresult_tresulttype.cs
- SystemResourceKey.cs
- ImmutableObjectAttribute.cs
- DbParameterHelper.cs
- DiscoveryClientReferences.cs
- PeerHelpers.cs
- ReadWriteSpinLock.cs
- Win32.cs
- Win32.cs
- EventLogTraceListener.cs
- EpmSyndicationContentSerializer.cs
- CompiledAction.cs
- CustomSignedXml.cs
- QueueAccessMode.cs
- ProfileSettingsCollection.cs
- UnaryOperationBinder.cs
- HwndSourceKeyboardInputSite.cs
- PeerNameResolver.cs
- ParamArrayAttribute.cs
- OrderPreservingPipeliningSpoolingTask.cs
- diagnosticsswitches.cs
- Manipulation.cs
- PathGeometry.cs
- DebuggerAttributes.cs
- Property.cs
- SafeHandle.cs
- DataGridColumnCollection.cs
- FullTrustAssembliesSection.cs
- XMLUtil.cs
- SourceCollection.cs
- HtmlInputPassword.cs
- EventlogProvider.cs
- WebPartMovingEventArgs.cs
- HitTestFilterBehavior.cs
- XmlSerializerSection.cs
- ZipIOExtraField.cs
- TextCompositionEventArgs.cs
- AuthenticationModulesSection.cs
- MailAddress.cs
- XamlTypeMapper.cs
- CheckBox.cs
- Vector3DAnimationBase.cs
- NetSectionGroup.cs
- Translator.cs
- RegexMatch.cs
- HttpCachePolicy.cs
- ProfileSection.cs
- Quack.cs
- Version.cs
- TemplateBamlRecordReader.cs
- PageAction.cs
- ContextDataSourceView.cs
- Message.cs
- PassportAuthentication.cs
- DictionarySectionHandler.cs
- WebPartVerbCollection.cs
- UnsignedPublishLicense.cs
- baseshape.cs
- IDReferencePropertyAttribute.cs
- QilReplaceVisitor.cs
- AlternateViewCollection.cs
- CssTextWriter.cs
- DataSvcMapFile.cs
- ToolStripSplitStackLayout.cs
- NamespaceList.cs
- XmlSchemaDocumentation.cs
- KernelTypeValidation.cs
- RuleElement.cs
- PageContentCollection.cs