File tree Expand file tree Collapse file tree
src/NetArchTest.Rules/Dependencies
test/NetArchTest.TestStructure/Dependencies/TypeOfSearch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,14 @@ public void CheckDependency(TypeReference dependency)
102102 }
103103 else
104104 {
105- _hasDependencyFromOutsideOfSearchTree = true ;
105+ if ( _hasDependencyFromOutsideOfSearchTree == false )
106+ {
107+ bool isGlobalAnonymousCompilerGeneratedType = String . IsNullOrEmpty ( dependency . Namespace ) && dependency . Name . StartsWith ( "<>" ) ;
108+ if ( ! isGlobalAnonymousCompilerGeneratedType )
109+ {
110+ _hasDependencyFromOutsideOfSearchTree = true ;
111+ }
112+ }
106113 }
107114 }
108115 }
Original file line number Diff line number Diff line change 22{
33 using System ;
44 using System . Collections . Generic ;
5+ using System . Linq ;
56 using System . Text ;
67
78#pragma warning disable 169
89
910 public class Class_A
1011 {
12+ public static void LetUsCreateSomeAnonymousTypes ( )
13+ {
14+ var numbers = Enumerable . Range ( 0 , 1 ) ;
15+ var result = from x in numbers
16+ join z in numbers on x equals z
17+ select ( x , z ) ;
18+ }
1119 }
1220
1321 public class Class_B
You can’t perform that action at this time.
0 commit comments