We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@
$
App.Bind<IService,Service>() .Needs("$params") .Given(()=> new object());
新增虚函数
/// <summary> /// 根据上下文获取相关的构建闭包 /// </summary> /// <param name="makeServiceBindData">请求注入操作的服务绑定数据</param> /// <param name="service">服务名</param> /// <param name="paramName">目标参数名</param> /// <returns>构建闭包</returns> protected virtual Func<object> GetContextualClosure(Bindable makeServiceBindData, string service, string paramName);
/// <summary> /// 从上下文闭包中进行构建获得实例 /// </summary> /// <param name="closure">上下文闭包</param> /// <param name="needType">参数需求的类型</param> /// <param name="ouput">构建的实例</param> /// <returns>是否成功构建</returns> protected virtual bool MakeFromContextualClosure(Func<object> closure, Type needType, out object ouput);
/// <summary> /// 根据上下文获取相关的需求服务 /// </summary> /// <param name="makeServiceBindData">请求注入操作的服务绑定数据</param> /// <param name="service">构建的服务名</param> /// <param name="paramName">目标参数的名字</param> /// <returns>需求的服务名</returns> protected virtual string GetContextualService(Bindable makeServiceBindData, string service, string paramName);
/// <summary> /// 从上下文关系的服务名获取服务实现 /// </summary> /// <param name="service">上下文关系的服务名</param> /// <param name="needType">参数需求类型</param> /// <param name="output">构建的实例</param> /// <returns>是否成功构建</returns> protected virtual bool MakeFromContextualService(string service, Type needType, out object output);
/// <summary> /// 根据上下文来解决指定需求的服务 /// </summary> /// <param name="makeServiceBindData">请求注入操作的服务绑定数据</param> /// <param name="service">构建的服务名字</param> /// <param name="paramName">目标参数的名字</param> /// <param name="paramType">目标参数的类型</param> /// <param name="output">构建的实例</param> /// <returns>是否成功通过上下文解决</returns> protected virtual bool ResloveFromContextual(Bindable makeServiceBindData, string service, string paramName, Type paramType, out object output);
The text was updated successfully, but these errors were encountered:
resolved #122
276a3d4
cbc30c2
7e6a7f2
No branches or pull requests
@
作为变量标签,应该使用$
替代。新增虚函数
The text was updated successfully, but these errors were encountered: