File tree Expand file tree Collapse file tree 2 files changed +0
-17
lines changed
ArchUnitNET/Domain/Extensions Expand file tree Collapse file tree 2 files changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -110,23 +110,9 @@ string assemblyQualifiedName
110110 )
111111 where TType : IHasAssemblyQualifiedName
112112 {
113- #if ! DEBUG
114113 return source . FirstOrDefault ( type =>
115114 type . AssemblyQualifiedName == assemblyQualifiedName
116115 ) ;
117- #else
118- var matchingTypes = source
119- . Where ( type => type . AssemblyQualifiedName == assemblyQualifiedName )
120- . ToList ( ) ;
121- if ( matchingTypes . Count > 1 )
122- {
123- throw new MultipleOccurrencesInSequenceException (
124- $ "Assembly qualified name { assemblyQualifiedName } found multiple times in provided types. "
125- + "Please use extern alias to reference assemblies that have the same fully-qualified type names."
126- ) ;
127- }
128- return matchingTypes . FirstOrDefault ( ) ;
129- #endif
130116 }
131117 }
132118}
Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ public void SameFullNameInMultipleAssemblies()
6161 type . Namespace . FullName == "DuplicateClassAcrossAssemblies"
6262 )
6363 . ToList ( ) ;
64- var types2 = ArchUnitNETTestArchitecture
65- . ReferencedTypes . Where ( type => type . FullName . Contains ( "Duplicate" ) )
66- . ToList ( ) ;
6764 Assert . Equal ( 2 , types . Count ) ;
6865 Assert . Single ( types , type => type . Assembly . Name . StartsWith ( "LoaderTestAssembly" ) ) ;
6966 Assert . Single ( types , type => type . Assembly . Name . StartsWith ( "OtherLoaderTestAssembly" ) ) ;
You can’t perform that action at this time.
0 commit comments