ProfilerFilter is the abstract base class for all filters for the Linq-to-SQL Profiler. Inherit this class to implement a new filter. Filters that rely on SQL Server execution plan data for evaluating filter conditions should be marked with the UsesExecutionPlanDataAttribute attribute.
Namespace: HuagatiEFProfiler.FiltersAssembly: HuagatiEFProfiler (in HuagatiEFProfiler.dll) Version: 1.33.3996.16092
Syntax
C# |
---|
public abstract class ProfilerFilter |
Visual Basic |
---|
Public MustInherit Class ProfilerFilter |
Visual C++ |
---|
public ref class ProfilerFilter abstract |
Examples
The following example shows how to implement a custom filter for use with the Linq-to-SQL Profiler.
CopyC#
public class MyCustomFilter : ProfilerFilter { public override bool IsValid(QueryInformation query) { //if the query reads more than 1Mb of table data, or more than 1Mb of LOBs, include in the profiler log if (query.TotalReadsKilobytes > 1024 || query.TotalLOBReadsKilobytes > 1024) { return true; } else { return false; } } }
Inheritance Hierarchy
System..::..Object
HuagatiEFProfiler.Filters..::..ProfilerFilter
HuagatiEFProfiler.Filters..::..ExecutionTimeAndPageReadsFilter
HuagatiEFProfiler.Filters..::..ExecutionTimeFilter
HuagatiEFProfiler.Filters..::..InfoMessageFilter
HuagatiEFProfiler.Filters..::..MissingIndexFilter
HuagatiEFProfiler.Filters..::..NullFilter
HuagatiEFProfiler.Filters..::..PageReadFilter
HuagatiEFProfiler.Filters..::..PageReadsPerSecondFilter
HuagatiEFProfiler.Filters..::..PrePlanPostPlanFilter
HuagatiEFProfiler.Filters..::..ProfilerFilterDisabled
HuagatiEFProfiler.Filters..::..TableFilter
HuagatiEFProfiler.Filters..::..TableScanFilter
HuagatiEFProfiler.Filters..::..ProfilerFilter
HuagatiEFProfiler.Filters..::..ExecutionTimeAndPageReadsFilter
HuagatiEFProfiler.Filters..::..ExecutionTimeFilter
HuagatiEFProfiler.Filters..::..InfoMessageFilter
HuagatiEFProfiler.Filters..::..MissingIndexFilter
HuagatiEFProfiler.Filters..::..NullFilter
HuagatiEFProfiler.Filters..::..PageReadFilter
HuagatiEFProfiler.Filters..::..PageReadsPerSecondFilter
HuagatiEFProfiler.Filters..::..PrePlanPostPlanFilter
HuagatiEFProfiler.Filters..::..ProfilerFilterDisabled
HuagatiEFProfiler.Filters..::..TableFilter
HuagatiEFProfiler.Filters..::..TableScanFilter