Пример #1
0
 public TwilioHub(IQueueStateHandler queueStateHandler, IQueueService queueService, IQueueProvider queueProvider, IAgentService agentService)
 {
     _queueStateHandler = queueStateHandler;
     _queueService = queueService;
     _queueProvider = queueProvider;
     _agentService = agentService;
 }
Пример #2
0
 public AgentController(IAgentService agentService, IHttpContextAccessor httpContextAccessor, IAdvertisementService advertisementService, IUtilities utilities)
 {
     _agentService         = agentService;
     _httpContextAccessor  = httpContextAccessor;
     _advertisementService = advertisementService;
     _utilities            = utilities;
 }
Пример #3
0
        /// <summary>安装、卸载 服务</summary>
        /// <param name="service">服务对象</param>
        /// <param name="isinstall">是否安装</param>
        public static void Install(this IAgentService service, Boolean isinstall = true)
        {
            var name = service.ServiceName;

            if (String.IsNullOrEmpty(name))
            {
                throw new Exception("未指定服务名!");
            }

            if (name.Length < name.GetBytes().Length)
            {
                throw new Exception("服务名不能是中文!");
            }

            name = name.Replace(" ", "_");
            // win7及以上系统时才提示
            if (Environment.OSVersion.Version.Major >= 6)
            {
                WriteLine("在win7/win2008及更高系统中,可能需要管理员权限执行才能安装/卸载服务。");
            }
            if (isinstall)
            {
                RunSC("create " + name + " BinPath= \"" + ExeName.GetFullPath() + " -s\" start= auto DisplayName= \"" + service.DisplayName + "\"");
                if (!String.IsNullOrEmpty(service.Description))
                {
                    RunSC("description " + name + " \"" + service.Description + "\"");
                }
            }
            else
            {
                service.ControlService(false);

                RunSC("Delete " + name);
            }
        }
Пример #4
0
 public FirebaseCustomerService(IFirebaseCustomerRepository customerRepository, IAgentService agentService, ICounterRepository counterRepository, IMessageRepository messageRepository)
 {
     _customerRepository = customerRepository;
     _messageRepository  = messageRepository;
     _counterRepository  = counterRepository;
     _agentService       = agentService;
 }
Пример #5
0
        public ImportPermitService(IUnitOfWork unitOfWork, IImportPermitRepository importPermitRepository, IUserService userService, IDocumentService documentService,
                                   IService <vwImportPermit> vwImportPermitService, IService <vwPIP> vwPIPService, IService <ImportPermitLogStatus> importLog,
                                   IService <ImportPermitStatus> importPermitStatus, IService <ImportPermitType> importPermitTypeService,
                                   IService <UserRole> userRoleService, IService <UserAgent> userAgentService, IService <Submodule> submoduleService,
                                   IService <SupplierProduct> supplierProduct,
                                   IService <SystemSetting> systemSettingService, IAgentService agentService,
                                   IService <Country> countryService, IWIPService wipService, NotificationFactory notificationFactory, IOptions <SystemUserConfig> options) : base(unitOfWork, importPermitRepository)
        {
            _unitOfWork              = unitOfWork;
            _userService             = userService;
            _userRoleService         = userRoleService;
            _documentService         = documentService;
            _vwImportPermitService   = vwImportPermitService;
            _vwPIPService            = vwPIPService;
            _importLog               = importLog;
            _importPermitStatus      = importPermitStatus;
            _importPermitTypeService = importPermitTypeService;
            _userAgentService        = userAgentService;
            _supplierProduct         = supplierProduct;
            _submoduleService        = submoduleService;
            _systemSettingService    = systemSettingService;
            _countryService          = countryService;
            _agentService            = agentService;
            _wipService              = wipService;
            _notificationFactory     = notificationFactory;
            _systemUser              = options.Value;

            PopulateEmailContentDictionaryMap();
        }
 public WMITaskManager(ILogger logger, ISqlServerRepository sqlServerRepo, IAgentService agentService, IHelper helper)
 {
     _logger           = logger;
     _sqlService       = sqlServerRepo;
     this.agentService = agentService;
     _helper           = helper;
 }
Пример #7
0
        private async Task StopConversation(IAgentService agentService, Activity agentActivity, CancellationToken cancellationToken)
        {
            var user = await agentService.GetUserInConversationAsync(agentActivity, cancellationToken);

            var agentReply = agentActivity.CreateReply();

            if (user == null)
            {
                agentReply.Text = ConversationText.NobodyTalkingToYou;
                await Utility.SendToConversationAsync(agentReply);

                return;
            }

            var userActivity = user.ConversationReference.GetPostToBotMessage();
            await agentService.StopAgentUserConversationAsync(
                userActivity,
                agentActivity,
                cancellationToken);

            var userReply = userActivity.CreateReply();

            userReply.Text = ConversationText.DisconnectWithAgent;
            await Utility.SendToConversationAsync(userReply);

            userReply.Text = ConversationText.StillCanTalkWithBot;
            await Utility.SendToConversationAsync(userReply);

            agentReply.Text = ConversationText.StopTheConversation;
            await Utility.SendToConversationAsync(agentReply);
        }
Пример #8
0
 public FileController(IListingService listingService, IFileService fileService, IAgentService agentService, IUserService userService)
 {
     _listingService = listingService;
     _fileService    = fileService;
     _agentService   = agentService;
     _userService    = userService;
 }
Пример #9
0
        public AgentController(IMemberService memberService, IAgentService agentService, IContactService contactService, IMedallionService medallionService,
            IVehicleService vehicleService, IMeterManufacturerService meterManufacturerService, IStockholderService stockholderService, IAgentVehicleService agentVehicleService, IStandardDuesService standardDueService,
            IVehicleMakeService vehicleMakeService, IModelYearInsuranceService modelYearInsuranceService, IVehicleModelService vehicleModelService,
            IInsuranceDepositAgentService insuranceDepositService, IAutoLoanSetupAgentService autoLoanSetupService, IAccountReceivableAgentService accountReceivableService,
            ISavingDepositAgentService savingDepositService)
        {
            this.memberService = memberService;
            this.agentService = agentService;
            this.agentVehicleService = agentVehicleService;
            this.contactService = contactService;
            this.stockholderService = stockholderService;
            this.meterManufacturerService = meterManufacturerService;
            this.medallionService = medallionService;
            this.vehicleService = vehicleService;
            this.standardDueService = standardDueService;

            this._vehicleMakeService = vehicleMakeService;
            this._modelYearInsuranceService = modelYearInsuranceService;
            this._vehicleModelService = vehicleModelService;

            this.insuranceDepositService = insuranceDepositService;
            this.accountReceivableService = accountReceivableService;
            this.autoLoanSetupService = autoLoanSetupService;
            this.savingDepositService = savingDepositService;
        }
Пример #10
0
 public AgentsController(IAgentRegistrationService agentRegistrationService,
                         IAgentContextService agentContextService,
                         IAgentContextInternal agentContextInternal,
                         IAgentInvitationAcceptService agentInvitationAcceptService,
                         IInvitationRecordService invitationRecordService,
                         ITokenInfoAccessor tokenInfoAccessor,
                         IAgentSettingsManager agentSettingsManager,
                         IAgentService agentService,
                         IAgentStatusManagementService agentStatusManagementService,
                         IAgentInvitationRecordListService agentInvitationRecordListService,
                         IAgentInvitationCreateService agentInvitationCreateService,
                         IIdentityUserInfoService identityUserInfoService,
                         IAgentRolesAssignmentService rolesAssignmentService)
 {
     _agentRegistrationService     = agentRegistrationService;
     _agentContextService          = agentContextService;
     _agentContextInternal         = agentContextInternal;
     _agentInvitationAcceptService = agentInvitationAcceptService;
     _invitationRecordService      = invitationRecordService;
     _tokenInfoAccessor            = tokenInfoAccessor;
     _agentSettingsManager         = agentSettingsManager;
     _agentService = agentService;
     _agentStatusManagementService     = agentStatusManagementService;
     _agentInvitationRecordListService = agentInvitationRecordListService;
     _agentInvitationCreateService     = agentInvitationCreateService;
     _identityUserInfoService          = identityUserInfoService;
     _rolesAssignmentService           = rolesAssignmentService;
 }
Пример #11
0
 public ManagerController(IManagerService managerService, IAgentService agentService, IEquipmentService equipmentService, IEquipmentDistributionService equipmentDistributionService)
 {
     _managerService               = managerService;
     _agentService                 = agentService;
     _equipmentService             = equipmentService;
     _equipmentDistributionService = equipmentDistributionService;
 }
Пример #12
0
        private async Task StopConversation(IAgentService agentService, Activity agentActivity, CancellationToken cancellationToken)
        {
            var user = await agentService.GetUserInConversationAsync(agentActivity, cancellationToken);

            var agentReply = agentActivity.CreateReply();

            if (user == null)
            {
                agentReply.Text = "Hey! You were not talking to anyone.";
                await SendToConversationAsync(agentReply);

                return;
            }

            var userActivity = user.ConversationReference.GetPostToBotMessage();
            await agentService.StopAgentUserConversationAsync(
                userActivity,
                agentActivity,
                cancellationToken);

            var userReply = userActivity.CreateReply();

            userReply.Text = "You have been disconnected from our representative.";
            await SendToConversationAsync(userReply);

            userReply.Text = "But we can still talk :)";
            await SendToConversationAsync(userReply);

            agentReply.Text = "You have stopped the conversation.";
            await SendToConversationAsync(agentReply);
        }
Пример #13
0
        public MainWindow(IGenerator generator, ICallService callService, IAgentService agentService, IConsoleService consoleService, IOptions <AppSettings> settings)
        {
            InitializeComponent();

            this.generator      = generator;
            this.callService    = callService;
            this.consoleService = consoleService;
            this.agentService   = agentService;
            this.settings       = settings.Value;

            var allAgents = agentService.GetAllAgents();

            foreach (var agent in allAgents)
            {
                AgenstList.Items.Add(agent);
            }



            Calls      = new Queue <Call>();
            ActiveCall = new List <Call>();
            var newCalls = callService.GenerateCalls();

            foreach (var call in newCalls)
            {
                Calls.Enqueue(call);
            }


            LogConsole.Items.Add(consoleService.CallInfo(Calls.Count()));
            Task.Factory.StartNew(() =>
            {
                BeginInvokeExample();
            });
        }
Пример #14
0
 public TaskService(ICustomerService customerService, IChannelService channelService, IConversationService conversationService, IAgentService agentService)
 {
     _customerService     = customerService;
     _conversationService = conversationService;
     _channelService      = channelService;
     _agentService        = agentService;
 }
Пример #15
0
 public CallStatsService(ICallRepository callRepository, IQueueService queueService, IAgentService agentService, IQueueProvider queueProvider, IQueueStateHandler queueStateHandler)
 {
     _callRepository = callRepository;
     _queueService = queueService;
     _agentService = agentService;
     _queueProvider = queueProvider;
     _queueStateHandler = queueStateHandler;
 }
Пример #16
0
 public ApplyCardToUnitSystem(IStatsComputer statsComputer, GameState gameState, IEventSystem eventSystem, IAgentService agentService, Level level)
 {
     StatsComputer = statsComputer;
     GameState     = gameState;
     EventSystem   = eventSystem;
     AgentService  = agentService;
     Level         = level;
 }
 //public ExcelUploadController(ITblDisburseTmpService objTblDisburseTmpService, IDistributorService objDstributorService) : base()
 public ExcelUploadController(ITblDisburseTmpService objTblDisburseTmpService,
                              IDistributorService objDstributorService, IAgentService objAgentService, IAuditTrailService objAuditTrailService) : base()
 {
     this._TblDisburseTmpService = objTblDisburseTmpService;
     this._distributorService    = objDstributorService;
     this._agentService          = objAgentService;
     _auditTrailService          = objAuditTrailService;
 }
Пример #18
0
 public DatabaseLogger(ILogRepository logRepository, ILogService logService, ILogContext logContext, IEventRepository eventRepository, IAgentService agentService)
 {
     this.logRepository   = logRepository;
     this.agentService    = agentService;
     this.logService      = logService;
     this.logContext      = logContext;
     this.eventRepository = eventRepository;
 }
Пример #19
0
 public CounterpartyService(EdoContext context,
                            IAgentService agentService,
                            IDateTimeProvider dateTimeProvider)
 {
     _context          = context;
     _agentService     = agentService;
     _dateTimeProvider = dateTimeProvider;
 }
Пример #20
0
 public NotificationConnectionManager(
     IDepartmentService departmentService,
     IAgentService agentService
     )
 {
     _departmentService = departmentService;
     _agentService      = agentService;
 }
Пример #21
0
 public RouteController(IRouteService routeService, ILocationService locationService, IVehicleService vehicleService, IAgentService agentService, IConstService constService, IMapper mapper) : base(mapper)
 {
     _routeService    = routeService;
     _locationService = locationService;
     _vehicleService  = vehicleService;
     _agentService    = agentService;
     _constService    = constService;
 }
Пример #22
0
        public InternalApiController(IAgentService agentService, IDeploymentStateProvider deploymentStateProvider)
        {
            Guard.NotNull(agentService, "agentService");
            Guard.NotNull(deploymentStateProvider, "deploymentStateProvider");

            _agentService            = agentService;
            _deploymentStateProvider = deploymentStateProvider;
        }
Пример #23
0
 public AgencyManagementService(EdoContext context, IAgentService agentService, INotificationService notificationService,
                                IDateTimeProvider dateTimeProvider)
 {
     _context             = context;
     _agentService        = agentService;
     _notificationService = notificationService;
     _dateTimeProvider    = dateTimeProvider;
 }
Пример #24
0
 public AppVerifyService(IAgentRepository agentRepository, ICacheHelper cacheHelper, IAgentService agentService)
     : base(agentRepository, cacheHelper)
 {
     logError         = LogManager.GetLogger("ERROR");
     _agentRepository = agentRepository;
     _cacheHelper     = cacheHelper;
     _agentService    = agentService;
 }
Пример #25
0
 public AgencyController(IAgencyService agencyService, IAuthManager authManager, IAgentService agentService,
                         ILocationService locationService)
 {
     _agencyService   = agencyService;
     _authManager     = authManager;
     _agentService    = agentService;
     _locationService = locationService;
 }
        public InternalApiController(IAgentService agentService, IDeploymentStateProvider deploymentStateProvider)
        {
            Guard.NotNull(agentService, "agentService");
              Guard.NotNull(deploymentStateProvider, "deploymentStateProvider");

              _agentService = agentService;
              _deploymentStateProvider = deploymentStateProvider;
        }
Пример #27
0
 public ReportService(IReportRepository reportRepository, ITicketService ticketService, ICustomerService customerService, IAgentService agentService, IThreadService threadService)
 {
     _reportRepository = reportRepository;
     _agentService     = agentService;
     _threadService    = threadService;
     _customerService  = customerService;
     _ticketService    = ticketService;
 }
Пример #28
0
        public HistoryController(IAgentService agentService)
        {
            if (agentService == null)
            {
                throw new ArgumentNullException("agentService");
            }

            _agentService = agentService;
        }
Пример #29
0
 public AgentController(IAgentService service, IDsrService dsrService, IKycService kycService
                        , IErrorLogService _errorLogService, IAuditTrailService objAuditTrailService)
 {
     this._service        = service;
     this._dsrService     = dsrService;
     this._kycService     = kycService;
     this.errorLogService = _errorLogService;
     _auditTrailService   = objAuditTrailService;
 }
Пример #30
0
 /// <summary>
 /// Controller that sets position service in order to access context resources
 /// </summary>
 /// <param name="positionService">Parameter for setting position service</param>
 /// <param name="agentService">Parameter for setting agent service</param>
 /// <param name="candidateService">Parameter for setting candidate service</param>
 /// <param name="interviewService">Parameter for setting interview service</param>
 /// <param name="positionArchiveService">Parameter for setting position archive service</param>
 /// <param name="candidateArchiveService">Parameter for setting candidate archive service</param>
 public PositionController(IPositionService positionService, IAgentService agentService, ICandidateService candidateService, IInterviewService interviewService, IPositionArchiveService positionArchiveService, ICandidateArchiveService candidateArchiveService)
 {
     this.PositionService         = positionService;
     this.AgentService            = agentService;
     this.CandidateService        = candidateService;
     this.InterviewService        = interviewService;
     this.PositionArchiveService  = positionArchiveService;
     this.CandidateArchiveService = candidateArchiveService;
 }
 public RequirementsController(
     IAgentService agentService,
     IRequirementsService requirementsService,
     IMapper mapper)
 {
     _agentService        = agentService;
     _requirementsService = requirementsService;
     _mapper = mapper;
 }
Пример #32
0
 public AgencyService(ISessionBagService sessionBag, IAgentManager agentClient, IPersonManager personClient,
                      IUserSessionService userSessionService, IAgentService agentService, IOptions <AppSettings> appSettings) : base(appSettings)
 {
     _sessionBag         = sessionBag ?? throw new ArgumentNullException(nameof(sessionBag));
     _userSessionService = userSessionService ?? throw new ArgumentNullException(nameof(userSessionService));
     _agentService       = agentService ?? throw new ArgumentNullException(nameof(agentService));
     _agentClient        = agentClient ?? throw new ArgumentNullException(nameof(agentClient));
     _personClient       = personClient ?? throw new ArgumentNullException(nameof(personClient));
 }
Пример #33
0
        public DeploymentController(IAgentService agentService)
        {
            if (agentService == null)
              {
            throw new ArgumentNullException("agentService");
              }

              _agentService = agentService;
        }
Пример #34
0
        public MainWindow(AgentViewModels agentUser) : this()
        {
            dataBase = new EntityUnitOfWork("AgencyDB");

            Mapper.Reset();
            Mapper.Initialize(cfg =>
            {
                cfg.CreateMap <Agent, AgentViewModels>();
                cfg.CreateMap <Applicant, ApplicantViewModels>();//;.PreserveReferences();
                cfg.CreateMap <Employer, EmployerViewModels>();
                cfg.CreateMap <Position, PositionViewModels>();
                cfg.CreateMap <Vacancie, VacancieViewModels>();
                cfg.CreateMap <Role, RoleViewModels>();
                cfg.CreateMap <Deal, DealViewModels>();
                cfg.CreateMap <Contract, ContractViewModel>();
                cfg.CreateMap <PaymentAccount, PaymentAccountViewModel>();
            });

            agentService          = new AgentService(dataBase);
            applicantService      = new ApplicantService(dataBase);
            employerService       = new EmployerService(dataBase);
            positionService       = new PositionService(dataBase);
            vacancyService        = new VacancieService(dataBase);
            dealService           = new DealService(dataBase);
            roleService           = new RoleService(dataBase);
            contractService       = new ContractService(dataBase);
            paymentAccountService = new PaymentAccountService(dataBase);

            applicantsModel     = applicantService.GetAll();
            employersModel      = employerService.GetAll();
            rolesModel          = roleService.GetAll();
            agentsModel         = agentService.GetAll();
            positionsModel      = positionService.GetAll();
            vacanciesModel      = vacancyService.GetAll();
            dealsModel          = dealService.GetAll();
            contractModel       = contractService.GetAll();
            paymentAccountModel = paymentAccountService.GetAll();

            dGridApplicants.DataContext     = applicantsModel.Where(p => (p.Deals.Count < 1) & p.AgentId == agentUser.AgentId);
            dGridEmployer.DataContext       = employersModel;
            dGridPosition.DataContext       = positionsModel;
            dGridAgent.DataContext          = agentsModel;
            dGridVacancies.DataContext      = vacanciesModel;
            dGridDeals.DataContext          = dealsModel.Where(p => p.Applicant.AgentId == agentUser.AgentId);;
            dGridContract.DataContext       = contractModel.Where(p => p.AgentId == agentUser.AgentId);
            dGridPaymentAccount.DataContext = paymentAccountModel.Where(p => p.Contracts.AgentId == agentUser.AgentId);

            dGridReportWoman.DataContext = vacanciesModel.Where(p => p.Gender == Gender.женщина || p.Gender == Gender.любой);
            dGridReportMan.DataContext   = vacanciesModel.Where(p => p.Gender == Gender.мужчина || p.Gender == Gender.любой);
            cbPositions.ItemsSource      = positionsModel;
            if (agentUser.RoleId == 3)
            {
                tabAgents.Visibility = Visibility.Collapsed;
            }

            logger.Info("Application started");
        }
 public TwilioVoiceController(IQueueStateHandler queueStateHandler, IAccountSettings accountSettings, ILogger logger, ICallService callService, IQueueService queueService, IQueueProvider queueProvider, IAgentService agentService)
 {
     _queueStateHandler = queueStateHandler;
     _accountSettings = accountSettings;
     _logger = logger;
     _callService = callService;
     _queueService = queueService;
     _queueProvider = queueProvider;
     _agentService = agentService;
 }
Пример #36
0
        /// <summary>
        /// Controller that sets notification service in order to access context resources
        /// </summary>
        /// <param name="notificationService">Parameter for setting NotificationService</param>
        /// <param name="agentService">Parameter for setting AgentService</param>
        /// <param name="clientService">Parameter for setting ClientService</param>
        /// <param name="adminService">Parameter for setting AdminService</param>
        public NotificationController(INotificationService notificationService, IAgentService agentService, IClientService clientService, IAdminService adminService)
        {
            this.NotificationService = notificationService;

            this.AgentService = agentService;

            this.ClientService = clientService;

            this.AdminService = adminService;
        }
        public EnvDeploymentController(IAgentService agentService, ISessionService sessionService, IDeploymentStateProvider deploymentStateProvider)
        {
            Guard.NotNull(agentService, "agentService");
              Guard.NotNull(sessionService, "sessionService");
              Guard.NotNull(deploymentStateProvider, "deploymentStateProvider");

              _agentService = agentService;
              _sessionService = sessionService;
              _deploymentStateProvider = deploymentStateProvider;
        }
Пример #38
0
        public ApiController(ISessionService sessionService, IAgentService agentService)
        {
            if (sessionService == null)
              {
            throw new ArgumentNullException("sessionService");
              }

              if (agentService == null)
              {
            throw new ArgumentNullException("agentService");
              }

              _sessionService = sessionService;
              _agentService = agentService;
        }
Пример #39
0
        public MemberController(IMemberService memberService, IAgentService agentService, IContactService contactService, IMedallionService medallionService,
            IVehicleService vehicleService, IMeterManufacturerService meterManufacturerService, IStockholderService stockholderService, IAgentVehicleService agentVehicleService, IStandardDuesService standardDueService,
            IVehicleMakeService vehicleMakeService, IModelYearInsuranceService modelYearInsuranceService, IVehicleModelService vehicleModelService, IUniversalAgentRecordService _universalAgentRecordService,
            IRTAService rtaService, IMobilityService mobilityService)
        {
            this.memberService = memberService;
            this.agentService = agentService;
            this.agentVehicleService = agentVehicleService;
            this.contactService = contactService;
            this.stockholderService = stockholderService;
            this.meterManufacturerService = meterManufacturerService;
            this.medallionService = medallionService;
            this.vehicleService = vehicleService;
            this.standardDueService = standardDueService;

            this._vehicleMakeService = vehicleMakeService;
            this._modelYearInsuranceService = modelYearInsuranceService;
            this._vehicleModelService = vehicleModelService;
            this._universalAgentRecordService = _universalAgentRecordService;
            this.rtaService = rtaService;
            this.mobilityService = mobilityService;
        }
Пример #40
0
 public TFlowEngine(ILoggerFactory factory
     , IUserService userService
     , IAgentService agentService
     , IWorkItemService workItemService
     , IProcessService processService
     , IProcessTypeService processTypeService
     , ITimeZoneService timeZoneService
     , IWorkflowParser workflowParser
     , IMethodInvoker invoker
     ,ISchedulerService schedulerService)
 {
     this._log = factory.Create(typeof(TFlowEngine));
     this._userService = userService;
     this._agentService = agentService;
     this._workItemService = workItemService;
     this._processService = processService;
     this._processTypeService = processTypeService;
     this._timeZoneService = timeZoneService;
     this._workflowParser = workflowParser;
     this._invoker = invoker;
     this._schedulerService = schedulerService;
 }
Пример #41
0
 public WorkItemService(ILoggerFactory factory
     , IScriptParser scriptParser
     , IAgentService agentService
     , IProcessService processService
     , ISchedulerService resumptionService
     , IEventBus bus)
 {
     this._log = factory.Create(typeof(ProcessService));
     this._scriptParser = scriptParser;
     this._agentService = agentService;
     this._processService = processService;
     this._resumptionService = resumptionService;
     this._bus = bus;
 }
Пример #42
0
        public MainForm()
        {
            InitializeComponent();

              _agentService = new AgentServiceClient();
        }