@@ -19,25 +19,6 @@ public static bool ImplementsInterface(this IType type, Interface intf)
1919 ) ;
2020 }
2121
22- [ Obsolete (
23- "Either ImplementsInterface() without the useRegularExpressions parameter or ImplementsInterfaceMatching() should be used"
24- ) ]
25- public static bool ImplementsInterface (
26- this IType type ,
27- string pattern ,
28- bool useRegularExpressions
29- )
30- {
31- if ( type is GenericParameter )
32- {
33- return false ;
34- }
35-
36- return type . ImplementedInterfaces . Any ( implementedInterface =>
37- implementedInterface . FullNameMatches ( pattern , useRegularExpressions )
38- ) ;
39- }
40-
4122 public static bool ImplementsInterface ( this IType type , string fullName )
4223 {
4324 if ( type is GenericParameter )
@@ -74,26 +55,6 @@ public static bool IsAssignableTo(this IType type, IType assignableToType)
7455 return type . GetAssignableTypes ( ) . Contains ( assignableToType ) ;
7556 }
7657
77- [ Obsolete (
78- "Either IsAssignableTo() without the useRegularExpressions parameter or IsAssignableToTypeMatching() should be used"
79- ) ]
80- public static bool IsAssignableTo (
81- this IType type ,
82- string pattern ,
83- bool useRegularExpressions
84- )
85- {
86- if ( type is GenericParameter genericParameter )
87- {
88- return genericParameter . TypeConstraints . All ( t =>
89- t . IsAssignableTo ( pattern , useRegularExpressions )
90- ) ;
91- }
92-
93- return type . GetAssignableTypes ( )
94- . Any ( t => t . FullNameMatches ( pattern , useRegularExpressions ) ) ;
95- }
96-
9758 public static bool IsAssignableTo ( this IType type , string fullName )
9859 {
9960 if ( type is GenericParameter genericParameter )
@@ -278,18 +239,6 @@ public static Attribute GetAttributeOfType(this IType type, Class attributeClass
278239 ) ;
279240 }
280241
281- [ Obsolete (
282- "Either ResidesInNamespace() without the useRegularExpressions parameter or ResidesInNamespaceMatching() should be used"
283- ) ]
284- public static bool ResidesInNamespace (
285- this IType e ,
286- string pattern ,
287- bool useRegularExpressions
288- )
289- {
290- return e . Namespace . FullNameMatches ( pattern , useRegularExpressions ) ;
291- }
292-
293242 public static bool ResidesInNamespace ( this IType e , string fullName )
294243 {
295244 return e . Namespace . FullNameEquals ( fullName ) ;
@@ -300,18 +249,6 @@ public static bool ResidesInNamespaceMatching(this IType e, string pattern)
300249 return e . Namespace . FullNameMatches ( pattern ) ;
301250 }
302251
303- [ Obsolete (
304- "Either ResidesInAssembly() without the useRegularExpressions parameter or ResidesInAssemblyMatching() should be used"
305- ) ]
306- public static bool ResidesInAssembly (
307- this IType e ,
308- string pattern ,
309- bool useRegularExpressions
310- )
311- {
312- return e . Assembly . FullNameMatches ( pattern , useRegularExpressions ) ;
313- }
314-
315252 public static bool ResidesInAssembly ( this IType e , string fullName )
316253 {
317254 return e . Assembly . FullNameEquals ( fullName ) ;
@@ -322,21 +259,6 @@ public static bool ResidesInAssemblyMatching(this IType e, string pattern)
322259 return e . Assembly . FullNameMatches ( pattern ) ;
323260 }
324261
325- [ Obsolete (
326- "Either IsDeclaredAsFieldIn() without the useRegularExpressions parameter or IsDeclaredAsFieldInTypeMatching() should be used"
327- ) ]
328- public static bool IsDeclaredAsFieldIn (
329- this IType type ,
330- string pattern ,
331- bool useRegularExpressions
332- )
333- {
334- return type . GetFieldTypeDependencies ( true )
335- . Any ( dependency =>
336- dependency . Target . FullNameMatches ( pattern , useRegularExpressions )
337- ) ;
338- }
339-
340262 public static bool IsDeclaredAsFieldIn ( this IType type , string fullName )
341263 {
342264 return type . GetFieldTypeDependencies ( true )
0 commit comments