Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / Diagnostics / SeverityFilter.cs / 1 / SeverityFilter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; namespace System.Diagnostics { public class EventTypeFilter : TraceFilter { private SourceLevels level; public EventTypeFilter(SourceLevels level) { this.level = level; } public override bool ShouldTrace(TraceEventCache cache, string source, TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data) { return ((int) eventType & (int) level) != 0; } public SourceLevels EventType { get { return level; } set { level = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; namespace System.Diagnostics { public class EventTypeFilter : TraceFilter { private SourceLevels level; public EventTypeFilter(SourceLevels level) { this.level = level; } public override bool ShouldTrace(TraceEventCache cache, string source, TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data) { return ((int) eventType & (int) level) != 0; } public SourceLevels EventType { get { return level; } set { level = value; } } } } // 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
- RawStylusInputReport.cs
- ListBase.cs
- WindowsImpersonationContext.cs
- CodeStatementCollection.cs
- ReadOnlyObservableCollection.cs
- DiscreteKeyFrames.cs
- SmtpException.cs
- XmlSchemaException.cs
- MergablePropertyAttribute.cs
- TrackBarRenderer.cs
- AnimationClockResource.cs
- AvTrace.cs
- Pen.cs
- Column.cs
- CustomErrorsSectionWrapper.cs
- HGlobalSafeHandle.cs
- CryptoApi.cs
- FastEncoderWindow.cs
- EventLogger.cs
- XPathEmptyIterator.cs
- ClientSettings.cs
- ProcessingInstructionAction.cs
- StylusPoint.cs
- Binding.cs
- ColumnResizeAdorner.cs
- PrimaryKeyTypeConverter.cs
- DataPagerFieldCollection.cs
- FileDialog.cs
- SemanticResultKey.cs
- TraceHandler.cs
- SqlProviderServices.cs
- BoundPropertyEntry.cs
- TemplatedMailWebEventProvider.cs
- UdpDiscoveryEndpointProvider.cs
- TextPenaltyModule.cs
- Renderer.cs
- ServiceOperationParameter.cs
- ActivityCodeDomSerializer.cs
- AssertFilter.cs
- HttpProxyTransportBindingElement.cs
- EmptyStringExpandableObjectConverter.cs
- HandleCollector.cs
- LoginUtil.cs
- UnsafeNativeMethods.cs
- Console.cs
- DataGridViewSortCompareEventArgs.cs
- OutputWindow.cs
- ListControl.cs
- AppDomain.cs
- ProxySimple.cs
- BatchParser.cs
- CodeBlockBuilder.cs
- TableLayoutRowStyleCollection.cs
- ContractNamespaceAttribute.cs
- CryptoHelper.cs
- SQLDecimalStorage.cs
- MediaContextNotificationWindow.cs
- LinearGradientBrush.cs
- NativeMethods.cs
- GrammarBuilderWildcard.cs
- FilterableAttribute.cs
- COM2PictureConverter.cs
- While.cs
- XLinq.cs
- PassportIdentity.cs
- Visual3D.cs
- UpdateCommandGenerator.cs
- AuthorizationRuleCollection.cs
- EntityDataSourceChangedEventArgs.cs
- SolidColorBrush.cs
- BinaryFormatter.cs
- RootBrowserWindowAutomationPeer.cs
- ContextBase.cs
- DelegatingHeader.cs
- ConfigurationElement.cs
- OracleDataReader.cs
- XslNumber.cs
- ZipIOLocalFileHeader.cs
- EpmAttributeNameBuilder.cs
- COM2ExtendedUITypeEditor.cs
- CharAnimationUsingKeyFrames.cs
- PropertyTabAttribute.cs
- VersionedStreamOwner.cs
- Soap11ServerProtocol.cs
- FloaterParaClient.cs
- ImageDesigner.cs
- RenderingBiasValidation.cs
- IxmlLineInfo.cs
- TreeViewAutomationPeer.cs
- FontCollection.cs
- EditingCommands.cs
- KnownTypes.cs
- NotifyInputEventArgs.cs
- SerializationBinder.cs
- Popup.cs
- OSFeature.cs
- FixedSOMContainer.cs
- InProcStateClientManager.cs
- DBNull.cs
- DataGridViewCellStyleChangedEventArgs.cs