/// <summary> /// 绑定一个方法到容器 /// </summary> /// <param name="container">服务容器</param> /// <param name="method">方法名</param> /// <param name="target">调用目标</param> /// <param name="call">调用方法</param> public static IMethodBind BindMethod(this IContainer container, string method, object target, string call = null) { Guard.NotEmptyOrNull(method, "method"); Guard.Requires <ArgumentNullException>(target != null); return(container.BindMethod(method, target, target.GetType().GetMethod(call ?? Str.Method(method)))); }