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
- EntityStoreSchemaGenerator.cs
- HGlobalSafeHandle.cs
- EndpointBehaviorElement.cs
- UrlPath.cs
- EventLogPermissionEntryCollection.cs
- XpsFilter.cs
- EventTask.cs
- XmlCharType.cs
- WebPartManagerInternals.cs
- NoneExcludedImageIndexConverter.cs
- SqlDataSourceFilteringEventArgs.cs
- FacetChecker.cs
- FloatUtil.cs
- TransactionContext.cs
- Matrix.cs
- FontEditor.cs
- LineSegment.cs
- WriteTimeStream.cs
- SqlPersistenceProviderFactory.cs
- GlyphCache.cs
- CompiledXpathExpr.cs
- _UriTypeConverter.cs
- ConnectionPoolManager.cs
- SocketCache.cs
- SerializerProvider.cs
- ValidationVisibilityAttribute.cs
- CompiledELinqQueryState.cs
- NestedContainer.cs
- MemberProjectedSlot.cs
- IdentityHolder.cs
- ContentControl.cs
- GestureRecognizer.cs
- Journaling.cs
- AnnotationResource.cs
- Renderer.cs
- TraceHwndHost.cs
- ToolStripScrollButton.cs
- ConfigurationStrings.cs
- MatrixTransform3D.cs
- OutputCache.cs
- OraclePermission.cs
- FileInfo.cs
- SetUserLanguageRequest.cs
- DataGridRowClipboardEventArgs.cs
- Iis7Helper.cs
- StreamGeometry.cs
- ColumnMapCopier.cs
- filewebresponse.cs
- WindowsListViewItem.cs
- SchemaLookupTable.cs
- ISAPIRuntime.cs
- XmlUnspecifiedAttribute.cs
- CompositionDesigner.cs
- FormsAuthenticationEventArgs.cs
- Constraint.cs
- CodeNamespaceCollection.cs
- TraceContext.cs
- DelegatingTypeDescriptionProvider.cs
- ResourceBinder.cs
- EncryptedKey.cs
- BoundColumn.cs
- Baml2006SchemaContext.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- ProxyAttribute.cs
- DesignerDataView.cs
- PrintEvent.cs
- SourceElementsCollection.cs
- ValueUtilsSmi.cs
- WindowsMenu.cs
- FilterQuery.cs
- Base64Encoder.cs
- ExpandCollapsePattern.cs
- QueryResult.cs
- DefaultObjectMappingItemCollection.cs
- PasswordDeriveBytes.cs
- ListViewGroupCollectionEditor.cs
- XhtmlMobileTextWriter.cs
- FixedPageStructure.cs
- CultureData.cs
- SequenceRangeCollection.cs
- TypedDataSetSchemaImporterExtension.cs
- InvokeHandlers.cs
- IgnoreFileBuildProvider.cs
- NotifyCollectionChangedEventArgs.cs
- WinInetCache.cs
- HtmlTableCellCollection.cs
- FileStream.cs
- BoolExpression.cs
- PseudoWebRequest.cs
- NodeInfo.cs
- DataTableNewRowEvent.cs
- GradientPanel.cs
- PropertyGridEditorPart.cs
- SystemUnicastIPAddressInformation.cs
- RelationshipConstraintValidator.cs
- HyperLinkField.cs
- FormatSettings.cs
- CodeMemberMethod.cs
- SqlErrorCollection.cs
- XsdBuildProvider.cs