/// <summary> /// 添加或覆盖一个值服务。 /// </summary> /// <typeparam name="TExpect">预期服务类型。</typeparam> /// <param name="binder">绑定器。</param> /// <param name="name">值服务的参数名称。</param> /// <returns>类型服务的绑定器。</returns> public static IValueServiceBinder Use <TExpect>(this IServiceBuilder binder, string name) => binder.Use(typeof(TExpect), name);
/// <summary> /// 添加或覆盖一个预期服务类型。 /// </summary> /// <typeparam name="TExpect">预期服务类型。</typeparam> /// <param name="binder">绑定器。</param> /// <returns>类型服务的绑定器。</returns> public static ITypeServiceBinder Use <TExpect>(this IServiceBuilder binder) => binder.Use(typeof(TExpect));