Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / Diagnostics / SourceSwitch.cs / 1305376 / 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); } } } // 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
- XmlSchemaProviderAttribute.cs
- precedingsibling.cs
- PropertyValueUIItem.cs
- DriveNotFoundException.cs
- StorageConditionPropertyMapping.cs
- AccessedThroughPropertyAttribute.cs
- SiteMapDataSourceView.cs
- SinglePageViewer.cs
- PageWrapper.cs
- CodeCompileUnit.cs
- SelectionEditingBehavior.cs
- TableLayoutStyleCollection.cs
- ToolStripDropDownButton.cs
- ProfileService.cs
- ExportException.cs
- DispatcherOperation.cs
- PropertyValueUIItem.cs
- XmlReflectionMember.cs
- RegexCode.cs
- UIElementHelper.cs
- SplitterCancelEvent.cs
- TagNameToTypeMapper.cs
- ProfileModule.cs
- EntityReference.cs
- ResourceManager.cs
- Schema.cs
- CharConverter.cs
- GeneralTransform3D.cs
- BaseParaClient.cs
- CompleteWizardStep.cs
- Input.cs
- RoutedEventConverter.cs
- TypeCacheManager.cs
- CustomSignedXml.cs
- COAUTHINFO.cs
- TextProperties.cs
- FamilyMap.cs
- MetafileHeaderWmf.cs
- FakeModelItemImpl.cs
- FirstMatchCodeGroup.cs
- Parser.cs
- Style.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- MethodBuilderInstantiation.cs
- SpellerError.cs
- ListViewHitTestInfo.cs
- SafeMemoryMappedFileHandle.cs
- NodeLabelEditEvent.cs
- HostingPreferredMapPath.cs
- ProtocolViolationException.cs
- ServiceModelDictionary.cs
- PathFigureCollectionValueSerializer.cs
- WebBrowser.cs
- PropVariant.cs
- WsdlHelpGeneratorElement.cs
- InstanceNormalEvent.cs
- TextDpi.cs
- DataControlLinkButton.cs
- DecoderExceptionFallback.cs
- StatusBarPanel.cs
- FileDetails.cs
- XMLSchema.cs
- DataGridTable.cs
- UrlMappingsSection.cs
- CodeExpressionStatement.cs
- InputReport.cs
- OleDbCommand.cs
- RemotingAttributes.cs
- FormViewInsertEventArgs.cs
- CreateUserWizardStep.cs
- ReferentialConstraint.cs
- recordstate.cs
- StorageModelBuildProvider.cs
- TerminateDesigner.cs
- DataRecordInternal.cs
- AstTree.cs
- DesignTimeTemplateParser.cs
- Expression.cs
- CodeExporter.cs
- _HeaderInfo.cs
- IdentityNotMappedException.cs
- NavigationPropertySingletonExpression.cs
- GlyphElement.cs
- ThrowHelper.cs
- DataGridViewRowsAddedEventArgs.cs
- ComponentChangingEvent.cs
- ContentElement.cs
- SelectionProcessor.cs
- HttpCookieCollection.cs
- CodeSnippetStatement.cs
- CodePrimitiveExpression.cs
- TriggerBase.cs
- DocumentReferenceCollection.cs
- HitTestResult.cs
- RegexStringValidatorAttribute.cs
- HttpClientProtocol.cs
- MetabaseServerConfig.cs
- SqlConnectionStringBuilder.cs
- EventPrivateKey.cs
- AjaxFrameworkAssemblyAttribute.cs