MonoDevelop.CSharp.Completion.CSharpTextEditorCompletion.GetDeclaration C# (CSharp) Method

GetDeclaration() static private method

static private GetDeclaration ( IType type, IMethod method ) : IMethod
type IType
method IMethod
return IMethod
		static IMethod GetDeclaration (IType type, IMethod method)
		{
			foreach (IMethod cur in type.Methods) {
				if (cur.Name == method.Name && cur.Parameters.Count == method.Parameters.Count) {
					bool equal = true;
					for (int i = 0; i < cur.Parameters.Count; i++) {
						if (cur.Parameters[i].ReturnType.ToInvariantString () != method.Parameters[i].ReturnType.ToInvariantString ()) {
							equal = false;
							break;
						}
					}
					if (equal)
						return cur;
				}
			}
			return null;
		}