Mono.CSharp.ClassOrStruct.LookupExtensionMethod C# (CSharp) Method

LookupExtensionMethod() public method

public LookupExtensionMethod ( System.TypeSpec extensionType, string name, int arity, NamespaceEntry &scope ) : IList
extensionType System.TypeSpec
name string
arity int
scope NamespaceEntry
return IList
		public override IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
		{
			DeclSpace top_level = Parent;
			if (top_level != null) {
				while (top_level.Parent != null)
					top_level = top_level.Parent;

				var candidates = NamespaceEntry.NS.LookupExtensionMethod (extensionType, this, name, arity);
				if (candidates != null) {
					scope = NamespaceEntry;
					return candidates;
				}
			}

			return NamespaceEntry.LookupExtensionMethod (extensionType, name, arity, ref scope);
		}