Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / Diagnostics / SourceSwitch.cs / 1 / SourceSwitch.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Specialized; using System.Threading; using System.Security; using System.Security.Permissions; namespace System.Diagnostics { public class SourceSwitch : Switch { public SourceSwitch(string name) : base(name, String.Empty) {} public SourceSwitch(string displayName, string defaultSwitchValue) : base(displayName, String.Empty, defaultSwitchValue) { } public SourceLevels Level { get { return (SourceLevels) SwitchSetting; } [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)] set { SwitchSetting = (int) value; } } public bool ShouldTrace(TraceEventType eventType) { return (SwitchSetting & (int) eventType) != 0; } protected override void OnValueChanged() { SwitchSetting = (int) Enum.Parse(typeof(SourceLevels), Value, true); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpClientCertificate.cs
- DesignerCapabilities.cs
- OleAutBinder.cs
- WebSysDefaultValueAttribute.cs
- MobileUserControlDesigner.cs
- TableRow.cs
- EntityContainer.cs
- DependencyPropertyConverter.cs
- XmlAnyElementAttributes.cs
- CommentAction.cs
- TextReturnReader.cs
- PropertyChangedEventManager.cs
- StorageInfo.cs
- EventBuilder.cs
- WriterOutput.cs
- MultiView.cs
- PrtCap_Reader.cs
- InheritablePropertyChangeInfo.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XPathSelfQuery.cs
- listviewsubitemcollectioneditor.cs
- SoapAttributes.cs
- OperationContractAttribute.cs
- ConfigurationValidatorBase.cs
- PropertyManager.cs
- ImageIndexConverter.cs
- CLRBindingWorker.cs
- XamlSerializer.cs
- RadioButtonBaseAdapter.cs
- XmlQualifiedName.cs
- ObjectListItemCollection.cs
- OrderedParallelQuery.cs
- ToolStripItemGlyph.cs
- ExceptionValidationRule.cs
- RoamingStoreFileUtility.cs
- WorkflowDesignerMessageFilter.cs
- HtmlControl.cs
- DbConnectionFactory.cs
- CommittableTransaction.cs
- FontFamilyIdentifier.cs
- VisemeEventArgs.cs
- DataGridViewColumn.cs
- ViewCellSlot.cs
- GeometryDrawing.cs
- ActivityMarkupSerializer.cs
- SqlDeflator.cs
- CompressedStack.cs
- KeyEvent.cs
- DbProviderFactories.cs
- ImageCodecInfo.cs
- ScriptingAuthenticationServiceSection.cs
- ReceiveActivityDesignerTheme.cs
- TextChange.cs
- PeerNameRecordCollection.cs
- FixedTextView.cs
- DataTemplate.cs
- Util.cs
- XmlLinkedNode.cs
- Types.cs
- Stack.cs
- OleDbException.cs
- PropertyValueChangedEvent.cs
- Positioning.cs
- Point3DCollectionConverter.cs
- RemoteWebConfigurationHostStream.cs
- InstanceValue.cs
- ForwardPositionQuery.cs
- XsdCachingReader.cs
- BulletChrome.cs
- XmlToDatasetMap.cs
- CompositeScriptReference.cs
- UIElement.cs
- GridLength.cs
- XamlFrame.cs
- PathGeometry.cs
- MeshGeometry3D.cs
- ScrollProviderWrapper.cs
- ISFClipboardData.cs
- HuffmanTree.cs
- ExceptionRoutedEventArgs.cs
- SqlFormatter.cs
- AppSecurityManager.cs
- TextChangedEventArgs.cs
- GatewayDefinition.cs
- WebServiceBindingAttribute.cs
- OdbcParameterCollection.cs
- SvcMapFileSerializer.cs
- MediaScriptCommandRoutedEventArgs.cs
- SHA256.cs
- UiaCoreApi.cs
- SelectionGlyphBase.cs
- PeerCredential.cs
- ClientBuildManagerCallback.cs
- ProcessHostMapPath.cs
- RSAPKCS1SignatureFormatter.cs
- Span.cs
- XmlDataContract.cs
- TemplateAction.cs
- SpotLight.cs
- ConnectionPool.cs