@@ -25,10 +25,7 @@ public static bool ImplementsInterface(this IType type, Interface intf)
2525 ) ;
2626 }
2727
28- public static bool ImplementsInterface (
29- this IType type ,
30- string fullName
31- )
28+ public static bool ImplementsInterface ( this IType type , string fullName )
3229 {
3330 if ( type is GenericParameter )
3431 {
@@ -39,11 +36,8 @@ string fullName
3936 implementedInterface . FullNameEquals ( fullName )
4037 ) ;
4138 }
42-
43- public static bool ImplementsInterfaceMatching (
44- this IType type ,
45- string pattern
46- )
39+
40+ public static bool ImplementsInterfaceMatching ( this IType type , string pattern )
4741 {
4842 if ( type is GenericParameter )
4943 {
@@ -67,36 +61,24 @@ public static bool IsAssignableTo(this IType type, IType assignableToType)
6761 return type . GetAssignableTypes ( ) . Contains ( assignableToType ) ;
6862 }
6963
70- public static bool IsAssignableTo (
71- this IType type ,
72- string fullName
73- )
64+ public static bool IsAssignableTo ( this IType type , string fullName )
7465 {
7566 if ( type is GenericParameter genericParameter )
7667 {
77- return genericParameter . TypeConstraints . All ( t =>
78- t . IsAssignableTo ( fullName )
79- ) ;
68+ return genericParameter . TypeConstraints . All ( t => t . IsAssignableTo ( fullName ) ) ;
8069 }
8170
82- return type . GetAssignableTypes ( )
83- . Any ( t => t . FullNameEquals ( fullName ) ) ;
71+ return type . GetAssignableTypes ( ) . Any ( t => t . FullNameEquals ( fullName ) ) ;
8472 }
85-
86- public static bool IsAssignableToTypeMatching (
87- this IType type ,
88- string pattern
89- )
73+
74+ public static bool IsAssignableToTypeMatching ( this IType type , string pattern )
9075 {
9176 if ( type is GenericParameter genericParameter )
9277 {
93- return genericParameter . TypeConstraints . All ( t =>
94- t . IsAssignableTo ( pattern )
95- ) ;
78+ return genericParameter . TypeConstraints . All ( t => t . IsAssignableTo ( pattern ) ) ;
9679 }
9780
98- return type . GetAssignableTypes ( )
99- . Any ( t => t . FullNameMatches ( pattern ) ) ;
81+ return type . GetAssignableTypes ( ) . Any ( t => t . FullNameMatches ( pattern ) ) ;
10082 }
10183
10284 public static bool IsNestedIn ( this IType type , IType assignableToType )
@@ -262,58 +244,37 @@ public static Attribute GetAttributeOfType(this IType type, Class attributeClass
262244 attribute . FullName . Equals ( attributeClass . FullName )
263245 ) ;
264246 }
265-
266- public static bool ResidesInNamespace (
267- this IType e ,
268- string fullName
269- )
247+
248+ public static bool ResidesInNamespace ( this IType e , string fullName )
270249 {
271250 return e . Namespace . FullNameEquals ( fullName ) ;
272251 }
273252
274- public static bool ResidesInNamespaceMatching (
275- this IType e ,
276- string pattern
277- )
253+ public static bool ResidesInNamespaceMatching ( this IType e , string pattern )
278254 {
279255 return e . Namespace . FullNameMatches ( pattern ) ;
280256 }
281257
282- public static bool ResidesInAssembly (
283- this IType e ,
284- string fullName
285- )
258+ public static bool ResidesInAssembly ( this IType e , string fullName )
286259 {
287260 return e . Assembly . FullNameEquals ( fullName ) ;
288261 }
289- public static bool ResidesInAssemblyMatching (
290- this IType e ,
291- string pattern
292- )
262+
263+ public static bool ResidesInAssemblyMatching ( this IType e , string pattern )
293264 {
294265 return e . Assembly . FullNameMatches ( pattern ) ;
295266 }
296267
297- public static bool IsDeclaredAsFieldIn (
298- this IType type ,
299- string fullName
300- )
268+ public static bool IsDeclaredAsFieldIn ( this IType type , string fullName )
301269 {
302270 return type . GetFieldTypeDependencies ( true )
303- . Any ( dependency =>
304- dependency . Target . FullNameEquals ( fullName )
305- ) ;
271+ . Any ( dependency => dependency . Target . FullNameEquals ( fullName ) ) ;
306272 }
307-
308- public static bool IsDeclaredAsFieldInTypeMatching (
309- this IType type ,
310- string pattern
311- )
273+
274+ public static bool IsDeclaredAsFieldInTypeMatching ( this IType type , string pattern )
312275 {
313276 return type . GetFieldTypeDependencies ( true )
314- . Any ( dependency =>
315- dependency . Target . FullNameMatches ( pattern )
316- ) ;
277+ . Any ( dependency => dependency . Target . FullNameMatches ( pattern ) ) ;
317278 }
318279
319280 public static bool HasDependency ( this IType type , ITypeDependency dependency )
0 commit comments