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
- FaultReasonText.cs
- JavaScriptSerializer.cs
- Int32RectConverter.cs
- ContentValidator.cs
- ActivityDesignerAccessibleObject.cs
- PerspectiveCamera.cs
- XamlReader.cs
- DrawingGroup.cs
- ContentPlaceHolder.cs
- InstallerTypeAttribute.cs
- LeftCellWrapper.cs
- TextRange.cs
- DataTableClearEvent.cs
- BooleanAnimationBase.cs
- DrawingImage.cs
- SiteMapNodeCollection.cs
- FormsAuthenticationTicket.cs
- ThicknessAnimationUsingKeyFrames.cs
- CreateUserWizardAutoFormat.cs
- TrailingSpaceComparer.cs
- ValueExpressions.cs
- BufferModesCollection.cs
- Rotation3DKeyFrameCollection.cs
- Int64KeyFrameCollection.cs
- UnSafeCharBuffer.cs
- DbConnectionStringCommon.cs
- GroupByQueryOperator.cs
- ApplicationSettingsBase.cs
- HttpListener.cs
- IpcManager.cs
- MessageBox.cs
- DbgCompiler.cs
- CompositeClientFormatter.cs
- HttpModuleActionCollection.cs
- HashJoinQueryOperatorEnumerator.cs
- __Filters.cs
- EditorPartChrome.cs
- SqlConnectionHelper.cs
- HttpWrapper.cs
- UnsafeNativeMethodsCLR.cs
- ValidationErrorEventArgs.cs
- GenericNameHandler.cs
- NaturalLanguageHyphenator.cs
- FormViewModeEventArgs.cs
- ObjectAssociationEndMapping.cs
- SemanticAnalyzer.cs
- XDRSchema.cs
- EndpointAddressElementBase.cs
- ColorAnimationBase.cs
- DataTableNewRowEvent.cs
- PaintValueEventArgs.cs
- PenLineJoinValidation.cs
- FocusChangedEventArgs.cs
- HideDisabledControlAdapter.cs
- BasicBrowserDialog.designer.cs
- UdpDiscoveryEndpointElement.cs
- ProfilePropertySettingsCollection.cs
- BufferedStream.cs
- CodeActivityContext.cs
- DiagnosticsConfigurationHandler.cs
- Size.cs
- UrlPath.cs
- IApplicationTrustManager.cs
- NavigateEvent.cs
- ToolStripGrip.cs
- TextView.cs
- BoundingRectTracker.cs
- SemaphoreFullException.cs
- EtwTrackingParticipant.cs
- DATA_BLOB.cs
- TemplateParser.cs
- ExitEventArgs.cs
- EdmPropertyAttribute.cs
- ArgumentFixer.cs
- OdbcConnectionStringbuilder.cs
- SerializerWriterEventHandlers.cs
- QueryableFilterRepeater.cs
- ModelEditingScope.cs
- EventListener.cs
- NativeWindow.cs
- DataGridViewCellValueEventArgs.cs
- IdentityNotMappedException.cs
- IndentTextWriter.cs
- RefreshInfo.cs
- CatalogPartCollection.cs
- RecipientInfo.cs
- WizardStepBase.cs
- TransformDescriptor.cs
- LockCookie.cs
- RTTypeWrapper.cs
- Drawing.cs
- TextBoxAutoCompleteSourceConverter.cs
- OleDbException.cs
- EventLogSession.cs
- TextServicesHost.cs
- HwndStylusInputProvider.cs
- MouseActionConverter.cs
- AssemblyBuilder.cs
- ContextBase.cs
- WriterOutput.cs