ICSharpCode.NRefactory.CSharp.Completion.CSharpCompletionEngine.MatchDelegate C# (CSharp) Method

MatchDelegate() private method

private MatchDelegate ( IType delegateType, IMethod method ) : bool
delegateType IType
method IMethod
return bool
		bool MatchDelegate(IType delegateType, IMethod method)
		{
			var delegateMethod = delegateType.GetDelegateInvokeMethod();
			if (delegateMethod == null || delegateMethod.Parameters.Count != method.Parameters.Count) {
				return false;
			}
			
			for (int i = 0; i < delegateMethod.Parameters.Count; i++) {
				if (!delegateMethod.Parameters [i].Type.Equals(method.Parameters [i].Type)) {
					return false;
				}
			}
			return true;
		}