Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / Diagnostics / SeverityFilter.cs / 1305376 / 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
- DbProviderServices.cs
- XmlAttributeCollection.cs
- DelegateSerializationHolder.cs
- WebPartCatalogAddVerb.cs
- ListBoxItemAutomationPeer.cs
- TextRangeSerialization.cs
- EnumerableRowCollection.cs
- ClientTarget.cs
- IWorkflowDebuggerService.cs
- LostFocusEventManager.cs
- BasePropertyDescriptor.cs
- AnnotationMap.cs
- DataGridCellAutomationPeer.cs
- keycontainerpermission.cs
- Hashtable.cs
- DependencyPropertyChangedEventArgs.cs
- PKCS1MaskGenerationMethod.cs
- SchemaCollectionCompiler.cs
- SettingsPropertyIsReadOnlyException.cs
- ImageSourceConverter.cs
- Menu.cs
- DrawingVisualDrawingContext.cs
- RectKeyFrameCollection.cs
- FlowDocumentScrollViewer.cs
- UnsafeNetInfoNativeMethods.cs
- LinqDataSourceView.cs
- WpfPayload.cs
- counter.cs
- TreeBuilder.cs
- Line.cs
- TransformValueSerializer.cs
- DataGridViewColumnConverter.cs
- MessageQueuePermissionAttribute.cs
- SelectedDatesCollection.cs
- DataChangedEventManager.cs
- PageThemeBuildProvider.cs
- PropertyEntry.cs
- SimpleBitVector32.cs
- SqlDataSourceQueryConverter.cs
- DispatcherOperation.cs
- AffineTransform3D.cs
- DesignSurfaceServiceContainer.cs
- WindowsGraphicsWrapper.cs
- DataGridPagerStyle.cs
- AdornerDecorator.cs
- OrElse.cs
- UidManager.cs
- Hash.cs
- PrinterResolution.cs
- SupportsEventValidationAttribute.cs
- MutexSecurity.cs
- XmlResolver.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- X509Chain.cs
- XamlStackWriter.cs
- PlatformCulture.cs
- AspCompat.cs
- VariableQuery.cs
- TdsParserSessionPool.cs
- RegisterInfo.cs
- DoubleLinkList.cs
- DataViewManagerListItemTypeDescriptor.cs
- LinkLabel.cs
- DragEvent.cs
- DbgUtil.cs
- SqlSelectStatement.cs
- Roles.cs
- DynamicRendererThreadManager.cs
- StandardBindingCollectionElement.cs
- FrameworkPropertyMetadata.cs
- HttpModule.cs
- XmlIlTypeHelper.cs
- SystemIcons.cs
- DbMetaDataColumnNames.cs
- HandlerMappingMemo.cs
- RelationshipConverter.cs
- EastAsianLunisolarCalendar.cs
- Atom10FormatterFactory.cs
- XmlDataSourceView.cs
- BitmapEffectOutputConnector.cs
- Wizard.cs
- MimeTypePropertyAttribute.cs
- ThemeInfoAttribute.cs
- ReadOnlyCollection.cs
- EventProxy.cs
- ThicknessAnimation.cs
- ConstantSlot.cs
- CallbackValidatorAttribute.cs
- BaseDataList.cs
- DiscoveryReference.cs
- StateMachineTimers.cs
- DataKeyArray.cs
- GridViewColumnHeader.cs
- StrongNameKeyPair.cs
- GridProviderWrapper.cs
- ResourcePermissionBaseEntry.cs
- BezierSegment.cs
- ResourceManager.cs
- FamilyTypeface.cs
- NavigatorInput.cs