/// <summary> /// Initializes a new instance of the <see cref="Installers"/> class. /// </summary> /// <param name="container"> /// The container. /// </param> public Installers(IUnityContainer container) { this.container = container; // initialize the communication setting AgentSetting.InitialSetting(); }
public static void MyClassInitialize(TestContext testContext) { string logSettingName = Assembly.GetExecutingAssembly().Location; logSettingName = Path.GetDirectoryName(logSettingName) + @"\log4net.Setting.xml"; LogInit.InitLog(logSettingName); AgentSetting.InitialSetting(); }
public Agent([NotNull] PersonName personName, [NotNull] string phoneNumber , [NotNull] AgentSetting setting , int depoId) { DepoId = depoId; PersonName = personName ?? throw new ArgumentNullException(); PhoneNumber = phoneNumber ?? throw new ArgumentNullException(); AgentSetting = setting ?? throw new ArgumentNullException(); Missions = new List <Mission>(); Events = new List <AgentEvent>(); MissionEvents = new List <MissionEvent>(); Commands = new List <Command>(); }
public Agent UpdateSetting([NotNull] AgentSetting setting) { LastUpdate = DateTime.Now; if (AgentSetting is null) { AgentSetting = setting; } else { AgentSetting.UpdateFrom(setting); } return(this); }
public async Task <AgentDto> CreateAsync(AgentDto dto) { await _unitOfWork.Agents.GuardForDuplicateEmailAddress(dto.Email); await _unitOfWork.Agents.GuardForDuplicatePhoneNumber(dto.PhoneNumber); var agent = new Agent(new PersonName(dto.Name, dto.Lastname) , dto.PhoneNumber, AgentSetting.CreateDefault() , dto.DepoId); agent.Register(dto.Email, _hasher.HashPassword(dto.Password)); await _unitOfWork.CompleteAsync(ctx => ctx.Agents.AddAsync(agent)); dto.Id = agent.Id; dto.Password = null; return(dto); }
public void UpdateAgentSetting(AgentSetting model) { aideAccountsData.UpdateAgentSetting(model); }
/// <summary> /// Load/Update the specified service's settings /// </summary> internal void Load(CService oService) { //If already in collection, remove it if (base.Contains(oService.serviceId)) { base.RemoveByKey(oService.serviceId); } UDInfo oInfo = new UDInfo { listType = (int)AgentInfoType.GET_SERVICE_SETTINGS, serviceId = oService.serviceId, serviceType = (int)oService.serviceType }; ServiceSettings oSvcSettings = (ServiceSettings)mpApp.Portal.WSAgent.getInfo(mpApp.CurrentAgent.AgentArg, oInfo); oService.allowHangup = Convert.ToBoolean(oSvcSettings.btnhangupf); oService.allowDial = Convert.ToBoolean(oSvcSettings.btndialf); oService.allow3Way = Convert.ToBoolean(oSvcSettings.btnxferf); oService.allowConsult = Convert.ToBoolean(oSvcSettings.btnconsultf); oService.allowConsultHangup = Convert.ToBoolean(oSvcSettings.btnthreecusthangupf); //Hold is not valid for AGD (aka AWD or Workgroup) calls so disable it. oService.allowHold = oService.ServiceType != ServiceType.AGD && Convert.ToBoolean(oSvcSettings.btnholdf); //AGD (aka AWD or Workgroup) services don't currently have a blind transfer setting in Director so default to enabled. oService.allowBlindXfer = oService.ServiceType == ServiceType.AGD || Convert.ToBoolean(oSvcSettings.btnblindxferf); oService.allowWarmXfer = Convert.ToBoolean(oSvcSettings.warmtransfer); oService.allowConference = Convert.ToBoolean(oSvcSettings.btnthreewayf); oService.allowRecord = Convert.ToBoolean(oSvcSettings.btnrecordf); oService.allowPlay = Convert.ToBoolean(oSvcSettings.btnplayf); oService.showCallData = Convert.ToBoolean(oSvcSettings.showcalldatadialogf); oService.showCallDataSecs = oSvcSettings.calldatadialogduration; oService.callDataDefId = oSvcSettings.calldatadefid; oService.wrapAlarmSecs = oSvcSettings.wrapwarningdelay; oService.requireDisposition = Convert.ToBoolean(oSvcSettings.reqdispositionf); oService.requireWrap = Convert.ToBoolean(oSvcSettings.reqwrapf); oService.allowNextCall = Convert.ToBoolean(oSvcSettings.btnnextcall); oService.application = oSvcSettings.appdesc; if (oService is CServiceAOD) { ((CServiceAOD)oService).allowPreviewNumberChange = Convert.ToBoolean(oSvcSettings.allowphonechangeinpreview); ((CServiceAOD)oService).timedPreview = Convert.ToBoolean(oSvcSettings.timedpreviewflag); ((CServiceAOD)oService).timedPreviewSecs = oSvcSettings.previewtimeoutinsecs; } else if (oService is CServiceManual) { ((CServiceManual)oService).allowSelfCallbacks = Convert.ToBoolean(oSvcSettings.cbselfcallbackflag); oInfo = new UDInfo { listType = (int)AgentInfoType.GET_AGENT_SETTINGS }; AgentSetting oAgentSettings = (AgentSetting)mpApp.Portal.WSAgent.getInfo(mpApp.CurrentAgent.AgentArg, oInfo); ((CServiceManual)oService).showServiceListForManualDial = Convert.ToBoolean(oAgentSettings.displayServicesF); ((CServiceManual)oService).requireServiceForManualDial = Convert.ToBoolean(oAgentSettings.requireServiceF); } else if (oService is CServiceChat) { ((CServiceChat)oService).allowChatDisconnect = Convert.ToBoolean(oSvcSettings.chatdisconnectallowed); } base.Add(oService.serviceId, oService); }
public static void MyClassInitialize(TestContext testContext) { AgentSetting.InitialSetting(); }