/// <summary> /// 初始化 /// </summary> /// <param name="endpoint"></param> /// <param name="factory"></param> /// <param name="serializer"></param> /// <param name="loadBalancingHelper"></param> public RemoteServiceInterceptor(Endpoint endpoint , ILoggerFactory factory , ISerializer serializer , ILoadBalancingHelper loadBalancingHelper) { this._endpoint = endpoint; this._log = factory.Create(typeof(RemoteServiceInterceptor)); this._serializer = serializer; this._loadBalancingHelper = loadBalancingHelper; }
/// <summary> /// 自定义负载均衡实现 /// </summary> /// <param name="helper"></param> /// <returns></returns> public ConfigurationWithDefault LoadBalancing(ILoadBalancingHelper helper) { this.DefaultContainer.Register(typeof(ILoadBalancingHelper), helper); return(this); }
/// <summary> /// 自定义负载均衡实现 /// </summary> /// <param name="helper"></param> /// <returns></returns> public ConfigurationWithCastle LoadBalancing(ILoadBalancingHelper helper) { this.IWindsorContainer.Register(Component.For <ILoadBalancingHelper>().Instance(helper)); return(this); }
/// <summary> /// 自定义负载均衡实现 /// </summary> /// <param name="helper"></param> /// <returns></returns> public ConfigurationWithDefault LoadBalancing(ILoadBalancingHelper helper) { this.DefaultContainer.Register(typeof(ILoadBalancingHelper), helper); return this; }