Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Sys / System / IO / compression / CompressionTracing.cs / 1305376 / CompressionTracing.cs
namespace System.IO.Compression { using System.Diagnostics; internal enum CompressionTracingSwitchLevel { Off = 0, Informational = 1, Verbose = 2 } internal class CompressionTracingSwitch : Switch { internal static CompressionTracingSwitch tracingSwitch = new CompressionTracingSwitch("CompressionSwitch", "Compression Library Tracing Switch"); internal CompressionTracingSwitch(string displayName, string description) : base(displayName, description) { } public static bool Verbose { get { return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Verbose; } } public static bool Informational { get { return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Informational; } } #if ENABLE_TRACING public void SetSwitchSetting(CompressionTracingSwitchLevel level) { if (level < CompressionTracingSwitchLevel.Off || level > CompressionTracingSwitchLevel.Verbose) { throw new ArgumentOutOfRangeException("level"); } this.SwitchSetting = (int)level; } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.IO.Compression { using System.Diagnostics; internal enum CompressionTracingSwitchLevel { Off = 0, Informational = 1, Verbose = 2 } internal class CompressionTracingSwitch : Switch { internal static CompressionTracingSwitch tracingSwitch = new CompressionTracingSwitch("CompressionSwitch", "Compression Library Tracing Switch"); internal CompressionTracingSwitch(string displayName, string description) : base(displayName, description) { } public static bool Verbose { get { return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Verbose; } } public static bool Informational { get { return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Informational; } } #if ENABLE_TRACING public void SetSwitchSetting(CompressionTracingSwitchLevel level) { if (level < CompressionTracingSwitchLevel.Off || level > CompressionTracingSwitchLevel.Verbose) { throw new ArgumentOutOfRangeException("level"); } this.SwitchSetting = (int)level; } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CustomAttributeFormatException.cs
- Point3D.cs
- ToolStripItemDataObject.cs
- PartitionResolver.cs
- SynchronizationHandlesCodeDomSerializer.cs
- HttpListenerElement.cs
- Win32.cs
- ContextQuery.cs
- ValidationError.cs
- DataGridViewHitTestInfo.cs
- TextRangeProviderWrapper.cs
- CompositionDesigner.cs
- EntityDataSourceDesigner.cs
- ObjectQueryProvider.cs
- AdCreatedEventArgs.cs
- HtmlContainerControl.cs
- HyperLinkStyle.cs
- Size3D.cs
- HttpConfigurationContext.cs
- SuppressMessageAttribute.cs
- GregorianCalendarHelper.cs
- GenerateTemporaryTargetAssembly.cs
- VariantWrapper.cs
- DataGridViewDataErrorEventArgs.cs
- WindowVisualStateTracker.cs
- DayRenderEvent.cs
- DynamicPhysicalDiscoSearcher.cs
- ModuleBuilder.cs
- PolyBezierSegment.cs
- HebrewNumber.cs
- XmlQueryTypeFactory.cs
- StorageSetMapping.cs
- WindowsEditBoxRange.cs
- XmlCharCheckingReader.cs
- ExitEventArgs.cs
- DragCompletedEventArgs.cs
- SortQuery.cs
- DPAPIProtectedConfigurationProvider.cs
- StylusPointProperty.cs
- hresults.cs
- UserMapPath.cs
- LastQueryOperator.cs
- ParseChildrenAsPropertiesAttribute.cs
- ThreadExceptionEvent.cs
- OutputCacheSettingsSection.cs
- BezierSegment.cs
- PersonalizationStateInfo.cs
- RectAnimationBase.cs
- NetworkCredential.cs
- CommandManager.cs
- Int16Storage.cs
- MetadataArtifactLoaderComposite.cs
- TextBoxBase.cs
- DataChangedEventManager.cs
- IdnElement.cs
- MarshalByValueComponent.cs
- SqlDataSourceEnumerator.cs
- CalendarDay.cs
- DataObjectAttribute.cs
- CodeDomLocalizationProvider.cs
- ExpressionPrefixAttribute.cs
- _ListenerResponseStream.cs
- OdbcConnectionString.cs
- ViewGenResults.cs
- GenerateScriptTypeAttribute.cs
- PopupRoot.cs
- GridView.cs
- ExpressionEvaluator.cs
- QuestionEventArgs.cs
- RectKeyFrameCollection.cs
- HasCopySemanticsAttribute.cs
- TemporaryBitmapFile.cs
- TransformProviderWrapper.cs
- Int16KeyFrameCollection.cs
- SerialReceived.cs
- ContractSearchPattern.cs
- FormatStringEditor.cs
- XsltException.cs
- TemporaryBitmapFile.cs
- RectangleGeometry.cs
- PromptBuilder.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- PropertyKey.cs
- ToolBar.cs
- SafeIUnknown.cs
- BitmapEffectState.cs
- InternalResources.cs
- WebPartsSection.cs
- XPathMessageFilterElement.cs
- SerializeAbsoluteContext.cs
- WindowsScroll.cs
- StateWorkerRequest.cs
- SymLanguageVendor.cs
- DataRecord.cs
- HwndMouseInputProvider.cs
- WSHttpBindingElement.cs
- CheckBox.cs
- InputScopeNameConverter.cs
- TimeoutConverter.cs
- FixedPageStructure.cs