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
- DbParameterCollection.cs
- SubpageParaClient.cs
- ManagementScope.cs
- TreeViewImageIndexConverter.cs
- TextSyndicationContent.cs
- SortDescription.cs
- XmlSchemaSimpleTypeRestriction.cs
- HashMembershipCondition.cs
- TransformConverter.cs
- Argument.cs
- GraphicsContext.cs
- WebCategoryAttribute.cs
- ByteConverter.cs
- TransformerInfo.cs
- UpdateProgress.cs
- OpenTypeLayout.cs
- ExceptionUtil.cs
- EventTrigger.cs
- LiteralTextParser.cs
- XamlTypeMapper.cs
- DataContext.cs
- XmlWhitespace.cs
- WriteFileContext.cs
- Evaluator.cs
- IxmlLineInfo.cs
- AnnotationComponentChooser.cs
- PropertyChangedEventManager.cs
- XmlCharCheckingReader.cs
- InitializationEventAttribute.cs
- PropertySourceInfo.cs
- XmlSchemaComplexContentRestriction.cs
- SourceChangedEventArgs.cs
- AdornerDecorator.cs
- QueryInterceptorAttribute.cs
- DefaultTraceListener.cs
- DesignerValidationSummaryAdapter.cs
- HelloOperationCD1AsyncResult.cs
- Crc32Helper.cs
- ContextMenu.cs
- TableLayoutCellPaintEventArgs.cs
- ComponentConverter.cs
- NumberFunctions.cs
- AccessDataSourceView.cs
- TreeView.cs
- ResourcesChangeInfo.cs
- HijriCalendar.cs
- HttpInputStream.cs
- ValidationResults.cs
- XmlUtf8RawTextWriter.cs
- BitmapCodecInfoInternal.cs
- DialogResultConverter.cs
- ADConnectionHelper.cs
- EvidenceBase.cs
- SortedList.cs
- AppDomainUnloadedException.cs
- WmlLabelAdapter.cs
- QuaternionConverter.cs
- TextBox.cs
- TransformGroup.cs
- FormsAuthentication.cs
- LocatorManager.cs
- CategoryAttribute.cs
- DiscoveryClientProtocol.cs
- PropertyEmitter.cs
- MetafileHeaderWmf.cs
- WebPartChrome.cs
- RestHandler.cs
- GridViewAutomationPeer.cs
- WebCategoryAttribute.cs
- Resources.Designer.cs
- SoapCodeExporter.cs
- ToolStripScrollButton.cs
- DefaultValueTypeConverter.cs
- MetadataArtifactLoaderResource.cs
- CompiledRegexRunnerFactory.cs
- DownloadProgressEventArgs.cs
- TiffBitmapEncoder.cs
- OdbcCommand.cs
- WrappedIUnknown.cs
- RequestBringIntoViewEventArgs.cs
- NativeMethodsCLR.cs
- InternalConfigConfigurationFactory.cs
- CharKeyFrameCollection.cs
- CellParaClient.cs
- ApplicationGesture.cs
- C14NUtil.cs
- URIFormatException.cs
- BaseServiceProvider.cs
- EventListenerClientSide.cs
- ProtocolElement.cs
- RecognizedWordUnit.cs
- ContentFilePart.cs
- TabControl.cs
- PropertyEmitter.cs
- ContainerSelectorActiveEvent.cs
- HttpCacheParams.cs
- ViewBase.cs
- TemplateField.cs
- RawAppCommandInputReport.cs
- CodeBinaryOperatorExpression.cs