Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- LeaseManager.cs
- SubstitutionResponseElement.cs
- NamedPipeConnectionPoolSettings.cs
- DataSourceGroupCollection.cs
- DebugInfoExpression.cs
- ErrorWebPart.cs
- ApplicationManager.cs
- NamespaceEmitter.cs
- SHA384Managed.cs
- ProxyWebPartConnectionCollection.cs
- ListViewSelectEventArgs.cs
- COM2Enum.cs
- NamedPipeConnectionPool.cs
- SequentialUshortCollection.cs
- BaseValidator.cs
- File.cs
- SettingsPropertyCollection.cs
- SiteMapDataSourceView.cs
- CodeTypeOfExpression.cs
- FlowDocumentFormatter.cs
- FontWeightConverter.cs
- SafePEFileHandle.cs
- EmptyControlCollection.cs
- ListParagraph.cs
- RtfFormatStack.cs
- BaseResourcesBuildProvider.cs
- _SafeNetHandles.cs
- DataServiceConfiguration.cs
- TextTreeUndo.cs
- Task.cs
- IRCollection.cs
- ClipboardProcessor.cs
- UnderstoodHeaders.cs
- TypeDescriptionProvider.cs
- Util.cs
- ScriptIgnoreAttribute.cs
- MemberMaps.cs
- __FastResourceComparer.cs
- ManagementScope.cs
- EdmPropertyAttribute.cs
- OdbcCommandBuilder.cs
- ListViewPagedDataSource.cs
- ParserStreamGeometryContext.cs
- ColorPalette.cs
- PopupEventArgs.cs
- Buffer.cs
- FixedTextBuilder.cs
- RecognizerInfo.cs
- AttributeProviderAttribute.cs
- GenericWebPart.cs
- SocketException.cs
- NumericUpDown.cs
- PolicyManager.cs
- ListViewGroupItemCollection.cs
- ImageBrush.cs
- DeferredSelectedIndexReference.cs
- Int32Storage.cs
- LocalizedNameDescriptionPair.cs
- XhtmlBasicFormAdapter.cs
- Decimal.cs
- RepeatButtonAutomationPeer.cs
- FormsAuthenticationTicket.cs
- BitmapCache.cs
- WizardStepBase.cs
- InsufficientExecutionStackException.cs
- XmlSchemaNotation.cs
- HtmlPhoneCallAdapter.cs
- RemotingAttributes.cs
- QueryableDataSourceEditData.cs
- ButtonChrome.cs
- KeyPullup.cs
- DesignerVerb.cs
- SymbolPair.cs
- Single.cs
- DynamicControlParameter.cs
- LogLogRecordHeader.cs
- XamlTemplateSerializer.cs
- CodeExpressionRuleDeclaration.cs
- LoaderAllocator.cs
- MetaModel.cs
- GlobalEventManager.cs
- X509SecurityTokenProvider.cs
- ILGen.cs
- CompressionTracing.cs
- DataServiceHostWrapper.cs
- ErrorItem.cs
- ControlAdapter.cs
- ConfigurationStrings.cs
- EventLogPermissionEntryCollection.cs
- DataRelationPropertyDescriptor.cs
- GridEntryCollection.cs
- BaseResourcesBuildProvider.cs
- RelationshipEndMember.cs
- XamlSerializerUtil.cs
- TableColumn.cs
- XPathNodePointer.cs
- _BasicClient.cs
- Keyboard.cs
- SqlParameterizer.cs
- DependencyObject.cs