2 types derived from Rule
System.Data.Entity (2)
System\Data\Query\InternalTrees\Rule.cs (2)
110internal sealed class SimpleRule : Rule 139internal sealed class PatternMatchRule: Rule
65 references to Rule
System.Data.Entity (65)
System\Data\Query\InternalTrees\RuleProcessor.cs (5)
45private static bool ApplyRulesToNode(RuleProcessingContext context, ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> rules, Node currentNode, out Node newNode) 52foreach (Rule r in rules[(int)currentNode.Op.OpType]) 86ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> rules, 155internal Node ApplyRulesToSubtree(RuleProcessingContext context, ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> rules, Node subTreeRoot) 247internal virtual void PostProcess(Node node, Rule rule)
System\Data\Query\PlanCompiler\TransformationRules.cs (60)
497internal override void PostProcess(Node n, InternalTrees.Rule rule) 595internal static readonly ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> AllRulesTable = BuildLookupTableForRules(AllRules); 601internal static readonly ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> ProjectRulesTable = BuildLookupTableForRules(ProjectOpRules.Rules); 608internal static readonly ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> PostJoinEliminationRulesTable = BuildLookupTableForRules(PostJoinEliminationRules); 615internal static readonly ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> NullabilityRulesTable = BuildLookupTableForRules(NullabilityRules); 621internal static readonly HashSet<InternalTrees.Rule> RulesRequiringProjectionPruning = InitializeRulesRequiringProjectionPruning(); 627internal static readonly HashSet<InternalTrees.Rule> RulesRequiringNullabilityRulesToBeReapplied = InitializeRulesRequiringNullabilityRulesToBeReapplied(); 631private static List<InternalTrees.Rule> allRules; 632private static List<InternalTrees.Rule> AllRules 638allRules = new List<InternalTrees.Rule>(); 655private static List<InternalTrees.Rule> postJoinEliminationRules; 656private static List<InternalTrees.Rule> PostJoinEliminationRules 662postJoinEliminationRules = new List<InternalTrees.Rule>(); 673private static List<InternalTrees.Rule> nullabilityRules; 674private static List<InternalTrees.Rule> NullabilityRules 680nullabilityRules = new List<InternalTrees.Rule>(); 691private static ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> BuildLookupTableForRules(IEnumerable<InternalTrees.Rule> rules) 693ReadOnlyCollection<InternalTrees.Rule> NoRules = new ReadOnlyCollection<InternalTrees.Rule>(new InternalTrees.Rule[0]); 695List<InternalTrees.Rule>[] lookupTable = new List<InternalTrees.Rule>[(int)OpType.MaxMarker]; 697foreach (InternalTrees.Rule rule in rules) 699List<InternalTrees.Rule> opRules = lookupTable[(int)rule.RuleOpType]; 702opRules = new List<InternalTrees.Rule>(); 708ReadOnlyCollection<InternalTrees.Rule>[] rulesPerType = new ReadOnlyCollection<InternalTrees.Rule>[lookupTable.Length]; 713rulesPerType[i] = new ReadOnlyCollection<InternalTrees.Rule>(lookupTable[i].ToArray()); 720return new ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>>(rulesPerType); 723private static HashSet<InternalTrees.Rule> InitializeRulesRequiringProjectionPruning() 725HashSet<InternalTrees.Rule> rulesRequiringProjectionPruning = new HashSet<InternalTrees.Rule>(); 746private static HashSet<InternalTrees.Rule> InitializeRulesRequiringNullabilityRulesToBeReapplied() 748HashSet<InternalTrees.Rule> rulesRequiringNullabilityRulesToBeReapplied = new HashSet<InternalTrees.Rule>(); 765ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> rulesTable = null; 798private static bool Process(PlanCompiler compilerState, ReadOnlyCollection<ReadOnlyCollection<InternalTrees.Rule>> rulesTable, out bool projectionPruningRequired) 1342internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 2068internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 2393internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 3319internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 3663internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 3766internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 3848internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 4321internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 4365internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 4403internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] { 4454internal static readonly InternalTrees.Rule[] Rules = new InternalTrees.Rule[] {