6 /// Summary description for MockSignature.
8 public class MethodSignature
10 public readonly string typeName
;
11 public readonly string methodName
;
12 public readonly Type
[] argTypes
;
14 public MethodSignature( string typeName
, string methodName
, Type
[] argTypes
)
16 this.typeName
= typeName
;
17 this.methodName
= methodName
;
18 this.argTypes
= argTypes
;
21 public bool IsCompatibleWith( object[] args
)
23 if ( args
.Length
!= argTypes
.Length
)
26 for( int i
= 0; i
< args
.Length
; i
++ )
27 if ( !argTypes
[i
].IsAssignableFrom( args
[i
].GetType() ) )
33 public static Type
[] GetArgTypes( object[] args
)
38 Type
[] argTypes
= new Type
[args
.Length
];
39 for (int i
= 0; i
< argTypes
.Length
; ++i
)
42 argTypes
[i
] = typeof(object);
44 argTypes
[i
] = args
[i
].GetType();