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
- CaseStatementProjectedSlot.cs
- WorkflowViewManager.cs
- GZipStream.cs
- RectangleF.cs
- WindowsGraphics2.cs
- TargetException.cs
- TextTrailingCharacterEllipsis.cs
- PhysicalFontFamily.cs
- PeerApplicationLaunchInfo.cs
- XmlDataSourceView.cs
- TreeViewCancelEvent.cs
- BinaryObjectInfo.cs
- AffineTransform3D.cs
- FrameDimension.cs
- RecordConverter.cs
- Number.cs
- XmlSchemaSimpleContentRestriction.cs
- ICspAsymmetricAlgorithm.cs
- cookiecollection.cs
- AudioException.cs
- MetaModel.cs
- XmlReaderSettings.cs
- SystemWebExtensionsSectionGroup.cs
- TreeViewAutomationPeer.cs
- SqlPersonalizationProvider.cs
- ConversionContext.cs
- RestHandlerFactory.cs
- ResourceReferenceKeyNotFoundException.cs
- UserPersonalizationStateInfo.cs
- RegisteredExpandoAttribute.cs
- Section.cs
- Compiler.cs
- SimpleTypeResolver.cs
- MailWriter.cs
- MaterialCollection.cs
- XmlCountingReader.cs
- XmlMemberMapping.cs
- DecoderBestFitFallback.cs
- hresults.cs
- OverlappedAsyncResult.cs
- FrameworkElementAutomationPeer.cs
- SerialStream.cs
- AesCryptoServiceProvider.cs
- ProxyWebPart.cs
- CompatibleIComparer.cs
- MessageHeaders.cs
- GrowingArray.cs
- Rethrow.cs
- _SingleItemRequestCache.cs
- ActivityMetadata.cs
- FormsAuthenticationUser.cs
- ParseHttpDate.cs
- GridViewUpdatedEventArgs.cs
- CharacterMetrics.cs
- UserControlCodeDomTreeGenerator.cs
- Tuple.cs
- ParserExtension.cs
- UInt64Storage.cs
- Permission.cs
- XamlParser.cs
- AdornerDecorator.cs
- ActionFrame.cs
- ThousandthOfEmRealPoints.cs
- StringUtil.cs
- IxmlLineInfo.cs
- DependencyObject.cs
- Unit.cs
- ReflectionHelper.cs
- Control.cs
- ClientClassGenerator.cs
- KeyInfo.cs
- CurrentChangingEventArgs.cs
- rsa.cs
- LinearGradientBrush.cs
- ScriptHandlerFactory.cs
- x509store.cs
- ActivityCodeGenerator.cs
- LocalValueEnumerator.cs
- ParallelEnumerable.cs
- CompilationUtil.cs
- SmuggledIUnknown.cs
- ApplicationInterop.cs
- HealthMonitoringSection.cs
- SystemTcpStatistics.cs
- PermissionAttributes.cs
- TextEditorThreadLocalStore.cs
- EncoderNLS.cs
- ResourcesBuildProvider.cs
- SqlParameterizer.cs
- DayRenderEvent.cs
- TempEnvironment.cs
- ComponentCollection.cs
- XmlSchemaAppInfo.cs
- DynamicResourceExtensionConverter.cs
- BamlRecordHelper.cs
- RMPermissions.cs
- SqlXml.cs
- WebPartMenu.cs
- DataProtectionSecurityStateEncoder.cs
- SID.cs