/// <summary> /// 业务处理入口 /// </summary> public void BizListen() { IBiz biz = null; foreach (var loc in locDic.Values) { ShowFormData.Instance.ShowFormInfo(new ShowInfoData("更新状态", loc.LocNo, InfoType.locStatus)); switch (loc.TaskType) { case "FinishTask": biz = new FinishTask(); break; case "DownTask": biz = new DownTask(); break; case "RequestSrmTask": biz = new RequestSrmTask(); break; case "DownCheckInfo": biz = new DownCheckInfo(); break; case "UpdateFreeFlag": biz = new UpdateFreeFlag(); break; } biz?.HandleLoc(loc.LocNo); } }
public WriteLogReqHdlr(ILoggerFactory loggerFactory, IBiz biz, IMapper mapper) { _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <WriteLogReqHdlr>(); _biz = biz; _mapper = mapper; }
public GetTagValueReqHdlr(ILoggerFactory loggerFactory, IBiz startup /*IMapper mapper*/) { _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <GetTagValueReqHdlr>(); _startup = startup; //_mapper = mapper; }
public GetConnectionStatusReqHdlr(ILoggerFactory loggerFactory, IBiz startup /*IMapper mapper*/) { _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <GetConnectionStatusReqHdlr>(); _startup = startup; //_mapper = mapper; }
public RoutineService(FunHaiNanContext context, IMapper mapper, NewiBeaconContext ibccontext, HainanContext hainanContext, IBiz biz) { _context = context; _mapper = mapper; _ibccontext = ibccontext; _hncontext = hainanContext; _biz = biz; }
/// <summary> /// 构造函数注入 /// </summary> /// <param name="ofpay"></param> /// <param name="token"></param> /// <param name="biz"></param> /// <param name="accout"></param> public OfpayController(IOfpay ofpay, IToken token, IBiz biz, IAccout accout) { _ofpay = ofpay; _token = token; _log = _log = LogManager.GetLogger(Startup.repository.Name, typeof(OfpayController)); _biz = biz; _accout = accout; }
/// <summary> /// 注入 /// </summary> /// <param name="user"></param> /// <param name="sys"></param> /// <param name="recharge"></param> /// <param name="biz"></param> /// <param name="token"></param> public AliPayController(IUser user, ISystems sys, IRecharge recharge, IBiz biz, IToken token) { _biz = biz; _recharge = recharge; _sys = sys; _user = user; _token = token; }
/// <summary> /// 构造函数注入 /// </summary> /// <param name="options"></param> /// <param name="recharge"></param> /// <param name="biz"></param> /// <param name="alipayService"></param> public AlipayNotifyController(IOptions <AliPaySetting> options, IRecharge recharge, IBiz biz, IAlipayService alipayService, IAccout accouts) { _appSettings = options.Value; _recharge = recharge; _biz = biz; _log = LogManager.GetLogger(Startup.repository.Name, typeof(AlipayNotifyController)); _alipayService = alipayService; _accout = accouts; }
/// <summary> /// 构造函数注入 /// </summary> /// <param name="routine"></param> /// <param name="sys"></param> /// <param name="token"></param> /// <param name="user"></param> /// <param name="biz"></param> /// <param name="gameKey"></param> public RoutineController(IRoutine routine, ISystems sys, IToken token, IUser user, IBiz biz, IOptions <GameKeySetting> gameKey) { _routine = routine; _sys = sys; _token = token; _user = user; _biz = biz; _gameKey = gameKey.Value; _log = _log = LogManager.GetLogger(Startup.repository.Name, typeof(RoutineController)); }
public Startup( ILoggerFactory loggerFactory, IBiz biz ) { _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <Startup>(); _biz = biz; _logger.LogInformation("C20052.Biz.Log startup! "); }
/// <summary> /// 构造函数注入 /// </summary> /// <param name="mag"></param> /// <param name="sys"></param> /// <param name="user"></param> /// <param name="token"></param> /// <param name="biz"></param> /// <param name="accout"></param> public UserController(IPhoneMessage mag, ISystems sys, IUser user, IToken token, IRoutine routine, IBiz biz, IAccout accout) { _mag = mag; _sys = sys; _user = user; _token = token; _biz = biz; _accout = accout; _log = LogManager.GetLogger(Startup.repository.Name, typeof(UserController)); _routine = routine; }
/// <summary> /// 构造函数注入 /// </summary> /// <param name="user"></param> /// <param name="token"></param> /// <param name="sys"></param> /// <param name="recharge"></param> /// <param name="routine"></param> /// <param name="biz"></param> public RechargeController(IUser user, IToken token, IOptions <WeChatPaySetting> weChatPay, IOptions <LqhnWeChatPaySetting> lqhnweChatPay, ISystems sys, IRecharge recharge, IRoutine routine, IBiz biz, IAccout accout) { _sys = sys; _user = user; _token = token; _recharge = recharge; _routine = routine; _biz = biz; _accout = accout; _weChatPay = weChatPay.Value; _lqhnweChatPay = lqhnweChatPay.Value; }
public IEnumerable <Dto.HeartBeat> SendHeartBeat(CancellationToken cancellationToken = default) { CallOptions = CallOptions.WithCancellationToken(cancellationToken); CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination); using (Channel) { IBiz client = Channel.CreateGrpcService <IBiz>(); return(client.SendHeartBeat(CallContext)); } }
/// <summary> /// 注入 /// </summary> /// <param name="token"></param> /// <param name="userTask"></param> /// <param name="biz"></param> /// <param name="user"></param> /// <param name="sys"></param> /// <param name="msg"></param> /// <param name="currencyKey"></param> /// <param name="accout"></param> public UserTaskController(IToken token, IUserTask userTask, IBiz biz, IUser user, ISystems sys, IPhoneMessage msg, IOptions <CurrencyKeySetting> currencyKey, IAccout accout) { _token = token; _userTask = userTask; _log = _log = LogManager.GetLogger(Startup.repository.Name, typeof(OfpayController)); _biz = biz; _user = user; _sys = sys; _msg = msg; _currencyKey = currencyKey.Value; _accout = accout; }
/// <summary> /// Configuration of services /// </summary> /// <param name="serviceProvider"></param> public void Configure(IServiceProvider serviceProvider) { //serviceProvider.UserSomething(); ILoggerFactory loggerFactory = serviceProvider.GetService <ILoggerFactory>(); loggerFactory.AddConsole(); IBiz biz = serviceProvider.GetService <IBiz>(); biz.Run(); }
/// <summary> /// Initializes a new instance of the <see cref="T:ZsqApp.Core.WebApi.Controllers.H5Controllres.WebBetsController"/> class. /// </summary> /// <param name="token"></param> /// <param name="biz"></param> /// <param name="gameKey"></param> /// <param name="user"></param> /// <param name="systems"></param> /// <param name="userTask"></param> /// <param name="currencyKey"></param> /// <param name="accout"></param> public WebBetsController(IToken token, IBiz biz, IOptions <GameKeySetting> gameKey, IUser user, ISystems systems, IUserTask userTask, IRoutine routine, IOptions <CurrencyKeySetting> currencyKey, IAccout accout) { _token = token; _biz = biz; _gameKey = gameKey.Value; _user = user; _sys = systems; _userTask = userTask; _currencyKey = currencyKey.Value; _log = _log = LogManager.GetLogger(Startup.repository.Name, typeof(WebBetsController)); _accout = accout; _routine = routine; }
public TagReadRpcServerHandler( ILoggerFactory loggerFactory, IComponentContext componentContext ) : base(loggerFactory, componentContext) { if (ComponentContext.IsRegistered <IBiz>()) { _biz = ComponentContext.Resolve <IBiz>(); } else { Logger.LogError("IBiz not Registered!"); } }
public ConnectionStatusRpcHandler( ILoggerFactory loggerFactory, IComponentContext componentContext ) : base(loggerFactory, componentContext) { if (ComponentContext.IsRegistered <IBiz>()) { _biz = ComponentContext.Resolve <IBiz>(); } else { Logger.LogError("IBiz not Registered!"); } }
public NotifyTagValueChangedHandler( ILogger <NotifyTagValueChangedHandler> logger, IComponentContext componentContext ) { _logger = logger; _componentContext = componentContext; if (_componentContext.IsRegistered <IBiz>()) { _biz = _componentContext.Resolve <IBiz>(); } else { _logger.LogError("IBiz not Registered!"); } }
public TagWriteEventHandler( ILoggerFactory loggerFactory, IComponentContext componentContext ) { _logger = loggerFactory.CreateLogger <TagInvokeEventHandler>(); _componentContext = componentContext; if (_componentContext.IsRegistered <IBiz>()) { _biz = _componentContext.Resolve <IBiz>(); } else { _logger.LogError("IBiz not Registered!"); } }
//private readonly IConnectionFactory _connectionFactory; //private readonly INotifierMediatorService _notifierMediatorService; //private readonly ITagGroupReady _tagGroupReady; //private readonly IAllTagGroupAllConnection _allTagGroupAllConnection; //private readonly string _machineName; //private List<Domain.Com.Entity.View.Joined.AllTagGroupAllConnection> _dataList; //public Dictionary<string, Domain.Com.Entity.Common.TagGroup> SystemGroups { get; } = new Dictionary<string, Domain.Com.Entity.Common.TagGroup>(); //public Dictionary<string, IEventBus> TagGroupEventBus { get; } = new Dictionary<string, IEventBus>(); public Startup( ILoggerFactory loggerFactory, IBiz biz //IConnectionFactory connectionFactory, //INotifierMediatorService notifierMediatorService, //ITagGroupReady tagGroupReady, //IAllTagGroupAllConnection allTagGroupAllConnection ) { _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <Startup>(); _biz = biz; //_connectionFactory = connectionFactory; //_notifierMediatorService = notifierMediatorService; //_tagGroupReady = tagGroupReady; //_allTagGroupAllConnection = allTagGroupAllConnection; //_machineName = Environment.MachineName; _logger.LogInformation("KBase.Business.Com startup machine name: "); }
public App.Dto.Res.Biz.GetTagValue GetTagValue(GetTagValue request, CancellationToken cancellationToken = default) { CallOptions = CallOptions.WithCancellationToken(cancellationToken); CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination); App.Dto.Res.Biz.GetTagValue output = new App.Dto.Res.Biz.GetTagValue(); try { using (Channel) { IBiz client = Channel.CreateGrpcService <IBiz>(); var result = client.GetTagValue(request, CallContext); output = result; } } catch (Exception ex) { Logger.LogError(GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " - " + ex.Source + " " + ex.Message + " " + ex.StackTrace); } return(output); }