Castle.MicroKernel.ModelBuilder.Inspectors.MethodMetaInspector.GetMethods C# (CSharp) Method

GetMethods() private method

private GetMethods ( Type implementation, String name, String signature ) : IList
implementation System.Type
name String
signature String
return IList
		private IList<MethodInfo> GetMethods(Type implementation, String name, String signature)
		{
			if (string.IsNullOrEmpty(signature))
			{
				var allmethods = implementation.GetMethods(AllMethods);

				var methods = new List<MethodInfo>();

				foreach (var method in allmethods)
				{
					if (CultureInfo.InvariantCulture.CompareInfo.Compare(method.Name, name, CompareOptions.IgnoreCase) == 0)
					{
						methods.Add(method);
					}
				}

				return methods;
			}
			else
			{
				var methodInfo = implementation.GetMethod(name, AllMethods, null, ConvertSignature(signature), null);

				if (methodInfo == null)
				{
					return new MethodInfo[0];
				}

				return new List<MethodInfo> { methodInfo };
			}
		}
	}