Beispiel #1
0
 public NavigatorService(IEventAggregator eventAggregator, IUrlParameterToObjectsPlateHeater urlParameterToObjectsPlateHeater, ILogService logService, INotificationService notificationService)
 {
     _eventAggregator = eventAggregator;
     this._notificationService = notificationService;
     this._logService = logService;
     _urlParameterToObjectsPlateHeater = urlParameterToObjectsPlateHeater;
 }
 public NotifycationControlPresenter()
 {
     _webContext = new WebContext();
     _userSession = new UserSession();
     _redirector = new Redirector();
     _notifycationService = new NotificationService();
 }
        public HttpResponseMessage Post([FromBody]JToken jsonbody)
        {
            // Process the jsonbody
            var requestStream = HttpContext.Current.Request.InputStream;

            Stream req = requestStream;
            req.Seek(0, System.IO.SeekOrigin.Begin);

            string json = jsonbody.ToString();

            ActionRequest ar = null;
            try
            {
                // assuming JSON.net/Newtonsoft library from http://json.codeplex.com/
                ar = JsonConvert.DeserializeObject<ActionRequest>(json);
            }
            catch
            {
                // Try and handle malformed POST body
                return new HttpResponseMessage(HttpStatusCode.BadRequest);
            }

            _notificationService = new NotificationService();
            ProgressState ps = ar.ToProgressObject(ar, ar.StateString);
            _notificationService.SendNotification(ps);

            _progressHub.sendProgressUpdate(ps);

            return new HttpResponseMessage(HttpStatusCode.Created);
        }
        public static void FromLegacy(
            this MembershipRebootConfiguration config, 
            INotificationService notificationService, 
            IPasswordPolicy passwordPolicy)
        {
            if (config == null) throw new ArgumentNullException("config");
            
            if (notificationService != null)
            {
                config.AddEventHandler(new NotificationServiceEventHandler(notificationService));
                if (config.SecuritySettings.RequireAccountVerification)
                {
                    config.AddEventHandler(new NotificationServiceAccountCreatedEventHandler(notificationService));
                }
            }

            if (passwordPolicy != null)
            {
                config.RegisterPasswordValidator(new DelegateValidator(
                    (svc, acct, password) =>
                    {
                        if (!passwordPolicy.ValidatePassword(password))
                        {
                            return new ValidationResult("Invalid password: " + passwordPolicy.PolicyMessage);
                        }
                        return null;
                    }));
            }
        }
 public ProvidersController(IProviderService providerService, INotificationService notificationService, ITemplateService templateService, ISysConfig config)
 {
     this._providerService = providerService;
     _notificationService = notificationService;
     _templateService = templateService;
     _config = config;
 }
 public PackageInstallationService(InstallationTaskQueue pendingInstalls, 
     RunningInstallationTaskList runningInstalls, 
     CompletedInstallationTaskList completedInstalls,
     IDeploymentService deploymentService,
     ILogger logger,
     IHubCommunicator hubCommunicator, 
     ILocalPackageCache agentCache, 
     IInstalledPackageArchive installCache, 
     RunningInstallationTaskList runningTasks, 
     IAgentSettingsManager settingsManager,
     IPackagesList allPackagesList,
     CurrentlyDownloadingList currentlyDownloadingList,
     INotificationService notificationService)
 {
     CompletedInstalls = completedInstalls;
     _deploymentService = deploymentService;
     _logger = logger;
     _hubCommunicator = hubCommunicator;
     _agentCache = agentCache;
     _installCache = installCache;
     _runningTasks = runningTasks;
     _settingsManager = settingsManager;
     _allPackagesList = allPackagesList;
     _currentlyDownloadingList = currentlyDownloadingList;
     _notificationService = notificationService;
     PendingInstalls = pendingInstalls;
     RunningInstalls = runningInstalls;
     TimedTask = new TimedSingleExecutionTask(5000, CheckForNewInstallations, _logger);
 }
Beispiel #7
0
 public DashboardController(INotificationService notificationService, IUserAccountService userAccountService)
 {
     _notificationService = notificationService;
     _userAccountService = userAccountService;
     this._dashboardService = new Cats.Services.EarlyWarning.DashboardService();
     this._needAssessmentSummaryService = new Cats.Services.Common.NeedAssessmentSummaryService();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DataAccessIntentHandler"/> class.
        /// </summary>
        public DataAccessIntentHandler(IIntentManager intentManager,
            INetworkSearchConfigBuilder networkSearchConfigBuilder,
            IDataSourcesAndSchema dataSourcesAndSchema,
            IExploreConfigBuilder exploreConfigBuilder,
            INotificationService notificationService,
            IExplorationIntentFactory explorationIntentFactory,
            IAcxiomConstants acxiomConstants)
        {
            mIntentManager = intentManager;
            mNetworkSearchConfigBuilder = networkSearchConfigBuilder;
            mDataSourcesAndSchema = dataSourcesAndSchema;
            mExploreConfigBuilder = exploreConfigBuilder;
            mNotificationService = notificationService;
            mExplorationIntentFactory = explorationIntentFactory;
            mAcxiomConstants = acxiomConstants;

            mDataSource = mDataSourcesAndSchema.DataSources.SingleOrDefault(x => x.Id.Equals(mAcxiomConstants.AcxiomDaodExternalContextRoot));

            if (mDataSource == null)
            {
                string extractDataSourceNotFound = string.Format(AcxiomStringResources.ErrorExternalDataSourceNotFound, mAcxiomConstants.AcxiomDaodExternalContextRoot);
                mNotificationService.PresentInformationNotificationWithoutDiagnosticsToTheUser(extractDataSourceNotFound);
                throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
                                                          AcxiomStringResources.ErrorExternalDataSourceNotFound,
                                                          mAcxiomConstants.AcxiomDaodExternalContextRoot));
            }
        }
 public GenerateTypeOptionsResult GetGenerateTypeOptions(
     string className,
     GenerateTypeDialogOptions generateTypeDialogOptions,
     Document document,
     INotificationService notificationService,
     IProjectManagementService projectManagementService,
     ISyntaxFactsService syntaxFactsService)
 {
     // Storing the actual values
     ClassName = className;
     GenerateTypeDialogOptions = generateTypeDialogOptions;
     if (DefaultNamespace == null)
     {
         DefaultNamespace = projectManagementService.GetDefaultNamespace(Project, Project?.Solution.Workspace);
     }
     return new GenerateTypeOptionsResult(
         accessibility: Accessibility,
         typeKind: TypeKind,
         typeName: TypeName,
         project: Project,
         isNewFile: IsNewFile,
         newFileName: NewFileName,
         folders: Folders,
         fullFilePath: FullFilePath,
         existingDocument: ExistingDocument,
         areFoldersValidIdentifiers: AreFoldersValidIdentifiers,
         defaultNamespace: DefaultNamespace,
         isCancelled: IsCancelled);
 }
 public PublicController(IRepository<InformationRequest> informationRequestRepository, IRepositoryWithTypedId<SeminarRole, string> seminarRoleRepository, IRepository<CaseStudy> caseStudyRepository, INotificationService notificationService)
 {
     _informationRequestRepository = informationRequestRepository;
     _seminarRoleRepository = seminarRoleRepository;
     _caseStudyRepository = caseStudyRepository;
     _notificationService = notificationService;
 }
 RepositoryCloneViewModel(
     IConnectionRepositoryHostMap connectionRepositoryHostMap,
     IRepositoryCloneService repositoryCloneService,
     IOperatingSystem operatingSystem,
     INotificationService notificationService)
     : this(connectionRepositoryHostMap.CurrentRepositoryHost, repositoryCloneService, operatingSystem, notificationService)
 { }
 public AccountEntityOperationLogic(INotificationService notificationService, ITemplateService templateService, IEntityRepository repository, ISecurityService securityService)
 {
     _notificationService = notificationService;
     _templateService = templateService;
     _repository = repository;
     _securityService = securityService;
 }
Beispiel #13
0
        public void Load(IServiceProvider serviceProvider)
        {
            try
            {
                s_traceContext = (ITraceContext)serviceProvider.GetService(typeof(ITraceContext));

                //must have the icelib sdk license to get the session as a service
                s_session = (Session)serviceProvider.GetService(typeof(Session));
                s_connection = new Connection.Connection(s_session);
            }
            catch (ArgumentNullException)
            {
                s_traceContext.Error("unable to get Icelib Session, is the ICELIB SDK License available?");
                Debug.Fail("unable to get service.  Is the ICELIB SDK licence available?");
                throw;
            }

            s_interactionManager = new InteractionManager(s_session, (IQueueService)serviceProvider.GetService(typeof(IQueueService)), s_traceContext);
            s_statusManager = new CicStatusService(s_session, s_traceContext);
            s_notificationService = (INotificationService)serviceProvider.GetService(typeof(INotificationService));

            s_settingsManager = new SettingsManager();
            s_deviceManager = new DeviceManager(s_traceContext, new SpokesDebugLogger(s_traceContext));

            s_statusChanger = new StatusChanger(s_session, s_statusManager, s_deviceManager, s_settingsManager);
            s_notificationServer = new NotificationServer(s_deviceManager, s_settingsManager, s_notificationService);

            s_hookSwitchManager = new InteractionSyncManager(s_interactionManager, s_deviceManager, (IQueueService)serviceProvider.GetService(typeof(IQueueService)), s_traceContext, s_connection);

            s_outboundEventNotificationService = new OutboundEventNotificationService(s_session, s_statusManager, s_deviceManager, s_traceContext);

            s_traceContext.Always("Plantronics AddIn Loaded");
        }
        public NotificationServiceTests()
        {
            EmailRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<EmailQueue, Guid>>();
            EmailPreferenceRepository = MockRepository.GenerateStub < IRepositoryWithTypedId<EmailPreferences, string>>();
            UserIdentity = MockRepository.GenerateStub<IUserIdentity>();
            UserRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<User, string>>();
            OrderStatusCodeRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<OrderStatusCode, string>>();
            ServerLink = MockRepository.GenerateStub<IServerLink>();
            QueryRepositoryFactory = MockRepository.GenerateStub<IQueryRepositoryFactory>();
            RepositoryFactory = MockRepository.GenerateStub<IRepositoryFactory>();
            RepositoryFactory.OrganizationRepository =
                MockRepository.GenerateStub<IRepositoryWithTypedId<Organization, string>>();

            AdminWorkgroupRepository = MockRepository.GenerateStub<IRepository<AdminWorkgroup>>();
            QueryRepositoryFactory.AdminWorkgroupRepository = AdminWorkgroupRepository;
            WorkgroupRepository = MockRepository.GenerateStub<IRepository<Workgroup>>();
            RepositoryFactory.WorkgroupRepository = WorkgroupRepository;

            NotificationService = new NotificationService(EmailRepository, EmailPreferenceRepository, UserRepository, OrderStatusCodeRepository, UserIdentity, ServerLink, QueryRepositoryFactory, RepositoryFactory);

            ServerLink.Expect(a => a.Address).Return("FakeHost").Repeat.Any();
            ApprovalRepository = MockRepository.GenerateStub<IRepository<Approval>>();

            SetupOrderStatusCodes();
        }
Beispiel #15
0
 /// <summary>
 /// Initializes a new instance of the ContentController class.
 /// </summary>
 /// <param name="contentService">Instance of Content Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public ContentController(IContentService contentService, IProfileService profileService, INotificationService queueService, ICommunityService communityService)
     : base(profileService)
 {
     _contentService = contentService;
     _notificationService = queueService;
     _communityService = communityService;
 }
Beispiel #16
0
 public AccountsController(IAccountRepository accountRepository, INotificationService notificationService, IAccountsSettingsService accountsSettingsService, IUserProfileService userProfileService)
 {
     this.accountRepository = accountRepository;
       this.notificationService = notificationService;
       this.accountsSettingsService = accountsSettingsService;
       this.userProfileService = userProfileService;
 }
Beispiel #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Window"/> class.
 /// </summary>
 /// <param name="frame">Parent Frame for this Window</param>
 /// <param name="hwnd">Native window handle</param>
 /// <param name="notificationService">Instance of Notification Service</param>
 public Window(Frame frame, IntPtr hwnd, INotificationService notificationService)
 {
     this.cachedStyle = IntPtr.Zero;
     this.notificationService = notificationService;
     this.Frame = frame;
     this.Handle = hwnd;
 }
        internal ChangeSignatureDialogViewModel(INotificationService notificationService, ParameterConfiguration parameters, ISymbol symbol, ClassificationTypeMap classificationTypeMap)
        {
            _originalParameterConfiguration = parameters;
            _notificationService = notificationService;
            _classificationTypeMap = classificationTypeMap;

            int startingSelectedIndex = 0;

            if (parameters.ThisParameter != null)
            {
                startingSelectedIndex++;

                _thisParameter = new ParameterViewModel(this, parameters.ThisParameter);
                _disabledParameters.Add(parameters.ThisParameter);
            }

            if (parameters.ParamsParameter != null)
            {
                _paramsParameter = new ParameterViewModel(this, parameters.ParamsParameter);
            }

            _symbol = symbol;
            _declarationParts = symbol.ToDisplayParts(s_symbolDeclarationDisplayFormat);

            _parameterGroup1 = parameters.ParametersWithoutDefaultValues.Select(p => new ParameterViewModel(this, p)).ToList();
            _parameterGroup2 = parameters.RemainingEditableParameters.Select(p => new ParameterViewModel(this, p)).ToList();
            this.SelectedIndex = startingSelectedIndex;
        }
 //private readonly IUserProfileService _userProfileService;
 public TransportRequisitionController(
     ITransportRequisitionService transportRequisitionService,
     IWorkflowStatusService workflowStatusService,
     IUserAccountService userAccountService,
     ILog log,
     IAdminUnitService adminUnitService,
     IProgramService programService,
     IReliefRequisitionService reliefRequisitionService,
     IHubAllocationService hubAllocationService,
     IProjectCodeAllocationService projectCodeAllocationService,
     IReliefRequisitionDetailService reliefRequisitionDetailService,
     IRationService rationService, INotificationService notificationService)
 {
     this._transportRequisitionService = transportRequisitionService;
     _workflowStatusService = workflowStatusService;
     _userAccountService = userAccountService;
     _log = log;
     _adminUnitService = adminUnitService;
     _programService = programService;
     _reliefRequisitionService = reliefRequisitionService;
     _hubAllocationService = hubAllocationService;
     _projectCodeAllocationService = projectCodeAllocationService;
     _reliefRequisitionDetailService = reliefRequisitionDetailService;
     _reliefRequisitionService = reliefRequisitionService;
     _rationService = rationService;
     _notificationService = notificationService;
     //_userProfileService = userProfileService;
 }
Beispiel #20
0
        public TrackViewModel(Guid guid, SynoTrack synoTrack, IPageSwitchingService pageSwitchingService, AlbumViewModelFactory albumViewModelFactory, IAudioStationSession session, IUrlParameterToObjectsPlateHeater urlParameterToObjectsPlateHeater, ITrackViewModelFactory trackViewModelFactory, INotificationService notificationService)
        {
            if (synoTrack == null)
            {
                throw new ArgumentNullException("synoTrack");
            }

            if (session == null)
            {
                throw new ArgumentNullException("session");
            }
            _trackViewModelFactory = trackViewModelFactory;
            _notificationService = notificationService;

            if (albumViewModelFactory == null) throw new ArgumentNullException("albumViewModelFactory");

            Guid = guid;
            TrackInfo = synoTrack;

            NavigateToContainingAlbumCommand = new DelegateCommand(OnNavigateToContainingAlbum);

            this._session = session;
            this._urlParameterToObjectsPlateHeater = urlParameterToObjectsPlateHeater;
            _albumViewModelFactory = albumViewModelFactory;
            _albumViewModelFactory = albumViewModelFactory;
            _pageSwitchingService = pageSwitchingService;
        }
 public PhobosInitializationAttribute(IUserManagementService userMngSvc, INavigationService navSvc, INotificationService notificationService, IMessageService msgService)
 {
     this.userManagementService = userMngSvc;
     this.navigationService = navSvc;
     this.notificationService = notificationService;
     this.msgService = msgService;
 }
 public CustomGalleryViewModel(IDetailService detailService, INotificationService notificationService, IUserFolders userFolders)
 {
     _detailService = detailService;
     _notificationService = notificationService;
     _userFolders = userFolders;
     Title = MenuViewModel.CustomGalleryItemTitle;
 }
        public DeliveryController(ITransportOrderService transportOrderService,
                                      IWorkflowStatusService workflowStatusService,
                                      IDispatchAllocationService dispatchAllocationService,
                                      IDeliveryService deliveryService,
            IDispatchService dispatchService,
            IDeliveryDetailService deliveryDetailService,
            INotificationService notificationService, IActionTypesService actionTypeService, IUserAccountService userAccountService,
            Cats.Services.EarlyWarning.ICommodityService commodityService, Cats.Services.EarlyWarning.IUnitService unitService,
            Cats.Services.Transaction.ITransactionService transactionService, IBusinessProcessService businessProcessService, IApplicationSettingService applicationSettingService, ITransporterPaymentRequestService transporterPaymentRequestService)
        {
            _transportOrderService = transportOrderService;
            _workflowStatusService = workflowStatusService;
            _dispatchAllocationService = dispatchAllocationService;
            _deliveryService = deliveryService;
            _dispatchService = dispatchService;
            _deliveryDetailService = deliveryDetailService;
            _notificationService = notificationService;

            _actionTypeService = actionTypeService;

            _userAccountService = userAccountService;
            _commodityService = commodityService;
            _unitService = unitService;
            _transactionService = transactionService;
            _businessProcessService = businessProcessService;
            _applicationSettingService = applicationSettingService;
            _transporterPaymentRequestService = transporterPaymentRequestService;
        }
        public void BeforeEach()
        {
            var notificationMock = new Mock<INotificationViewModel>();
            notificationMock.SetupGet(n => n.Id).Returns(_notificationId);
            notificationMock.SetupGet(n => n.SubjectId).Returns(_subjectId);
            notificationMock.SetupGet(n => n.SubjectName).Returns(SubjectName);
            notificationMock.SetupGet(n => n.Message).Returns(Message);

            _itemsSourceMock = new Mock<ICollection<INotificationViewModel>>();
            _itemsSourceMock.Setup(i => i.Add(It.IsAny<INotificationViewModel>())).Callback<INotificationViewModel>(m =>
            {
                _notificationAdded = m;
            });

            _notificationListViewModelMock = new Mock<INotificationListViewModel>();
            _notificationListViewModelMock.SetupGet(l => l.ItemsSource).Returns(_itemsSourceMock.Object).Verifiable();

            _notificationFactoryMock = new Mock<INotificationFactory>();
            _notificationFactoryMock.Setup(f => f.Create(It.IsAny<Guid>(), It.IsAny<Guid>(), It.IsAny<string>(), It.IsAny<string>())).Returns(notificationMock.Object).Verifiable();

            var notificationServiceDependenciesMock = new Mock<INotificationServiceDependencies>();
            notificationServiceDependenciesMock.SetupGet(d => d.NotificationListViewModel)
                .Returns(_notificationListViewModelMock.Object);

            notificationServiceDependenciesMock.SetupGet(d => d.NotificationFactory).Returns(_notificationFactoryMock.Object);

            _notificationService = new NotificationService(notificationServiceDependenciesMock.Object);
        }
 public ServerTask(NewSceneProcessor newSceneProcessor, ExclusiveProcessor exclusiveProcessor, INotificationService notificationService, AmbxEngineWrapper engine)
 {
     ServerTask.newSceneProcessor = newSceneProcessor;
       ServerTask.exclusiveProcessor = exclusiveProcessor;
       this.notificationService = notificationService;
       this.engine = engine;
 }
Beispiel #26
0
 public RequestController(IRegionalRequestService reliefRequistionService,
                         IFDPService fdpService,
                         IRegionalRequestDetailService reliefRequisitionDetailService,
                         ICommonService commonService,
                         IHRDService hrdService,
                         IApplicationSettingService ApplicationSettingService,
                         IUserAccountService userAccountService,
                         ILog log,
                         IHRDDetailService hrdDetailService,
                         IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService,
                         IRegionalPSNPPlanService RegionalPSNPPlanService,
     IAdminUnitService adminUnitService,
     IPlanService planService,
     IIDPSReasonTypeServices idpsReasonTypeServices, ITransactionService transactionService, INotificationService notificationService, IUserProfileService userProfileService)
 {
     _regionalRequestService = reliefRequistionService;
     _fdpService = fdpService;
     _regionalRequestDetailService = reliefRequisitionDetailService;
     _commonService = commonService;
     _hrdService = hrdService;
     _applicationSettingService = ApplicationSettingService;
     _userAccountService = userAccountService;
     _log = log;
     _HRDDetailService = hrdDetailService;
     _RegionalPSNPPlanDetailService = regionalPSNPPlanDetailService;
     _RegionalPSNPPlanService = RegionalPSNPPlanService;
     _adminUnitService = adminUnitService;
     _planService = planService;
     _idpsReasonTypeServices = idpsReasonTypeServices;
     _transactionService = transactionService;
     _notificationService = notificationService;
     _userProfileService = userProfileService;
 }
        public AutomationFactory(
            ISchedulerService schedulerService,
            INotificationService notificationService,
            IDateTimeService dateTimeService,
            IDaylightService daylightService,
            IOutdoorTemperatureService outdoorTemperatureService,
            IComponentService componentService,
            ISettingsService settingsService,
            IResourceService resourceService)
        {
            if (schedulerService == null) throw new ArgumentNullException(nameof(schedulerService));
            if (notificationService == null) throw new ArgumentNullException(nameof(notificationService));
            if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService));
            if (daylightService == null) throw new ArgumentNullException(nameof(daylightService));
            if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService));
            if (componentService == null) throw new ArgumentNullException(nameof(componentService));
            if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
            if (resourceService == null) throw new ArgumentNullException(nameof(resourceService));

            _schedulerService = schedulerService;
            _notificationService = notificationService;
            _dateTimeService = dateTimeService;
            _daylightService = daylightService;
            _outdoorTemperatureService = outdoorTemperatureService;
            _componentService = componentService;
            _settingsService = settingsService;
            _resourceService = resourceService;
        }
        public PlantronicsManager(IStatusManager statusManager, 
            IInteractionManager interactionManager,
            INotificationService notificationService,
            ITraceContext traceContext)
        {
            _statusManager = statusManager;
            _interactionManager = interactionManager;
            _traceContext = traceContext;
            _notificationService = notificationService;

            m_sessionComManager = new SessionComManagerClass();
            m_sessionManagerEvents = m_sessionComManager as ISessionCOMManagerEvents_Event;
            m_comSession = m_sessionComManager.Register("Interaction Client Plantronics AddIn");

            // Now check if our plugin session was created
            if (m_comSession != null)
            {
                // detect devices added/removed
                m_sessionManagerEvents.DeviceStateChanged += OnDeviceStateChanged;

                //Get current Device
                m_device = m_comSession.ActiveDevice;

                // if we have a device register for events
                if (m_device != null)
                {
                    // Register for device events
                    RegisterEvents();
                }
            }
        }
 public SettingsFileUserNotifier(SVsServiceProvider sp, INotificationService notifier, SettingsPersister persister, SettingsLocator locator)
 {
     this.locator = locator;
     this.notifier = notifier;
     this.persister = persister;
     dte = (DTE)sp.GetService(typeof(DTE));
 }
 public ReliefRequisitionController(
     IReliefRequisitionService reliefRequisitionService, 
     IWorkflowStatusService workflowStatusService, 
     IReliefRequisitionDetailService reliefRequisitionDetailService,
     IUserAccountService userAccountService,
     IRegionalRequestService regionalRequestService,
     IRationService rationService, 
     IDonorService donorService, 
     INotificationService notificationService, 
     IPlanService planService,
     ITransactionService transactionService,
     ICommonService commonService, IRationDetailService rationDetailService)
 {
     this._reliefRequisitionService = reliefRequisitionService;
     this._workflowStatusService = workflowStatusService;
     this._reliefRequisitionDetailService = reliefRequisitionDetailService;
     _userAccountService = userAccountService;
     _rationService = rationService;
     _donorService = donorService;
     _notificationService = notificationService;
     _planService = planService;
     _transactionService = transactionService;
     _commonService = commonService;
     _rationDetailService = rationDetailService;
     _regionalRequestService = regionalRequestService;
 }
Beispiel #31
0
 public MyViewModel(INotificationService notificationService, IBluetoothHelper bluetoothHelper)
 {
     _notificationService = notificationService;
     _bluetoothHelper     = bluetoothHelper;
     MyCommand            = new MvxCommand(MyCommandExecute);
 }
 /// <summary>
 /// Creates a new instance of a NotificationTemplateService, and initializes it with the specified arguments.
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="user"></param>
 /// <param name="service"></param>
 /// <param name="notifyService"></param>
 /// <param name="logger"></param>
 public NotificationTemplateService(PimsContext dbContext, ClaimsPrincipal user, IPimsService service, INotificationService notifyService, ILogger <TaskService> logger) : base(dbContext, user, service, logger)
 {
     _notifyService = notifyService;
 }
 public ProductCreatedHandler(INotificationService notification)
 {
     _notification = notification;
 }
Beispiel #34
0
 public NotificationController(INotificationService notifService)
 {
     _notifservice = notifService;
 }
Beispiel #35
0
 public UserController(IPasswordService passwordService, ISessionService sessionService, INotificationService notificationService, IDeleteService deleteService, GetDatabaseContext getDatabaseContext, ILogger <UserController> logger, ILoggerFactory loggerFactory)
 {
     _passwordService     = passwordService;
     _sessionService      = sessionService;
     _notificationService = notificationService;
     _deleteService       = deleteService;
     _getDatabaseContext  = getDatabaseContext;
     _logger      = logger;
     _auditLogger = loggerFactory.CreateAuditLogger();
 }
Beispiel #36
0
 public FeedService()
 {
     friendService   = new FriendService();
     followerService = new FollowerService();
     nfService       = new NotificationService();
 }
Beispiel #37
0
 public HabitVariationCreatedHandler(INotificationService notification)
 {
     _notification = notification;
 }
Beispiel #38
0
 private bool IsEnabled(INotificationService service, string notificationType)
 {
     return(string.IsNullOrEmpty(notificationType) ||
            _config.Configuration.NotificationOptions.IsServiceEnabled(service.Name, notificationType));
 }
 public UserAuthenticatedHandler(INotificationService notification)
 {
     _notification = notification;
 }
Beispiel #40
0
 public BookUserEmailService(IUserService userService, IBookService bookService, IEmailService emailService, IEmailTemplate emailTemplate, INotificationService notificationService, IMemoryCache memoryCache)
 {
     _userService         = userService;
     _bookService         = bookService;
     _emailService        = emailService;
     _emailTemplate       = emailTemplate;
     _notificationService = notificationService;
     _cache = memoryCache;
 }
 public NotificationsViewModel(IPlatformService platformService, INotificationService notificationService, ISignalRClient signalRClient) : base(platformService)
 {
     _notificationService = notificationService;
     _signalRClient       = signalRClient;
 }
 public AndroidNotificationsViewModel(IPlatformService platformService, INotificationService notificationService, ISignalRClient signalRClient) : base(platformService, notificationService, signalRClient)
 {
 }
Beispiel #43
0
 public MessagesController(IStorageService storageService, INotificationService notificationService)
 {
     _storageService      = storageService;
     _notificationService = notificationService;
 }
Beispiel #44
0
 public AdminAuthController(IAccountService accountService, IAccessTokenService accessTokenService, ILoggerService loggerService, INotificationService notificationService,
                            UserManager <AdministratorAccount> userManager, SignInManager <AdministratorAccount> signInManager, RoleManager <AdministratorRole> roleManager)
 {
     _accountService      = accountService;
     _accessTokenService  = accessTokenService;
     _notificationService = notificationService;
     _loggerService       = loggerService.CreateLogger(this);
     _signInManager       = signInManager;
     _userManager         = userManager;
     _roleManager         = roleManager;
 }
 public NotificationsController(IDataService data, INotificationService notes)
 {
     _data  = data;
     _notes = notes;
 }
Beispiel #46
0
 public NotificationController(INotificationService notificationService)
     : base(notificationService)
 {
     _notificationService = notificationService;
 }
Beispiel #47
0
 //
 // GET: /Admin/BadgeSubmission/
 public BadgeSubmissionController(IRepositoryFactory repositoryFactory, INotificationService notificationService) : base(repositoryFactory)
 {
     _notificationService = notificationService;
 }
 public HomeController(IConfiguration config, INotificationService notificationService)
 {
     _config = config;
     _notificationService = notificationService;
     _eventLogger         = NLogConfig.EventLogger.GetCurrentClassLogger();
 }
Beispiel #49
0
        public TrackViewModel(Guid guid, SynoTrack synoTrack, IPageSwitchingService pageSwitchingService, AlbumViewModelFactory albumViewModelFactory, IAudioStationSession session, IUrlParameterToObjectsPlateHeater urlParameterToObjectsPlateHeater, ITrackViewModelFactory trackViewModelFactory, INotificationService notificationService)
        {
            if (synoTrack == null)
            {
                throw new ArgumentNullException("synoTrack");
            }

            if (session == null)
            {
                throw new ArgumentNullException("session");
            }
            _trackViewModelFactory = trackViewModelFactory;
            _notificationService   = notificationService;

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

            Guid      = guid;
            TrackInfo = synoTrack;

            NavigateToContainingAlbumCommand = new DelegateCommand(OnNavigateToContainingAlbum);

            this._session = session;
            this._urlParameterToObjectsPlateHeater = urlParameterToObjectsPlateHeater;
            _albumViewModelFactory = albumViewModelFactory;
            _albumViewModelFactory = albumViewModelFactory;
            _pageSwitchingService  = pageSwitchingService;
        }
 public ClaimController(ILogger <ClaimController> logger, IClaimService claimService, ICustomerProfileService customerProfileService, INotificationService notificationService, IConfiguration configuration)
 {
     _logger                 = logger;
     _claimService           = claimService;
     _customerProfileService = customerProfileService;
     _notificationService    = notificationService;
     _configuration          = configuration;
 }
Beispiel #51
0
 public WithdrawMoney(IAccountRepository accountRepository, INotificationService notificationService)
 {
     _accountRepository   = accountRepository;
     _notificationService = notificationService;
 }
Beispiel #52
0
 public ProductController(ShoppingEntities shoppingEntities, INotificationService notificationService)
 {
     this.shoppingEntities    = shoppingEntities;
     this.notificationService = notificationService;
 }
Beispiel #53
0
        public void Init()
        {
            var unitOfWorkNotify = new Mock <IUnitOfWork>();

            _transportBidWinners = new List <BidWinner>()
            {
                new BidWinner()
                {
                    SourceID      = 1,
                    DestinationID = 1,
                    Tariff        = 100,
                    TransporterID = 1,
                    BidID         = 1
                }
            };

            _reliefRequisitions = new List <ReliefRequisition>()
            {
                new ReliefRequisition()
                {
                    RegionID                 = 1,
                    ProgramID                = 1,
                    CommodityID              = 1,
                    ZoneID                   = 2,
                    RequisitionNo            = "REQ-001",
                    Round                    = 1,
                    RegionalRequestID        = 1,
                    RequisitionID            = 1,
                    Status                   = 4,
                    ReliefRequisitionDetails = new List <ReliefRequisitionDetail>()
                    {
                        new ReliefRequisitionDetail
                        {
                            RequisitionID       = 1,
                            RequisitionDetailID = 1,
                            FDPID             = 1,
                            DonorID           = 1,
                            CommodityID       = 1,
                            Amount            = 10,
                            BenficiaryNo      = 12,
                            ReliefRequisition = new ReliefRequisition()
                            {
                                RequisitionID               = 1,
                                RegionID                    = 1,
                                RegionalRequestID           = 1,
                                TransportRequisitionDetails = new List <TransportRequisitionDetail>()
                                {
                                    new TransportRequisitionDetail()
                                    {
                                        RequisitionID = 1,
                                        TransportRequisitionDetailID = 1,
                                        TransportRequisitionID       = 1
                                    }
                                }
                            },
                            FDP = new FDP
                            {
                                Name        = "XYX",
                                AdminUnitID = 1,
                                FDPID       = 1
                            },
                        }
                    }
                }
            };
            var _tranportRequisitionDetail = new List <TransportRequisitionDetail>()
            {
                new TransportRequisitionDetail
                {
                    RequisitionID          = 1,
                    TransportRequisitionID = 1
                }
            };

            _transportOrders = new List <TransportOrder>()
            {
                new TransportOrder()
                {
                    TransporterID    = 1,
                    TransportOrderID = 1,
                    StatusID         = 1,
                    StartDate        = DateTime.Today,
                    EndDate          = DateTime.Today,
                    BidDocumentNo    = "xyz"
                }
            };

            var _transportRequisitons = new List <TransportRequisition>
            {
                new TransportRequisition
                {
                    TransportRequisitionID = 1,
                    Status = 1,
                    TransportRequisitionNo = "001"
                }
            };

            var _hubAllocation = new List <HubAllocation>
            {
                new HubAllocation
                {
                    RequisitionID = 1,
                    HubID         = 1
                }
            };

            var mockUnitOfWork = new Mock <IUnitOfWork>();
            var mockReliefRequisitionRepository = new Mock <IGenericRepository <ReliefRequisition> >();

            mockReliefRequisitionRepository.Setup(
                t => t.Get(It.IsAny <Expression <Func <ReliefRequisition, bool> > >(), It.IsAny <Func <IQueryable <ReliefRequisition>, IOrderedQueryable <ReliefRequisition> > >(), It.IsAny <string>())).Returns(
                (Expression <Func <ReliefRequisition, bool> > perdicate, Func <IQueryable <ReliefRequisition>, IOrderedQueryable <ReliefRequisition> > obrderBy, string prop) =>
            {
                var
                result = _reliefRequisitions.AsQueryable();
                return(result);
            }
                );
            mockReliefRequisitionRepository.Setup(t => t.FindById(It.IsAny <int>())).Returns((int id) => _reliefRequisitions
                                                                                             .ToList().
                                                                                             Find
                                                                                                 (t =>
                                                                                                 t.
                                                                                                 RequisitionID ==
                                                                                                 id));

            var mockReliefRequisionDetailRepository = new Mock <IGenericRepository <ReliefRequisitionDetail> >();

            mockReliefRequisionDetailRepository.Setup(
                t => t.Get(It.IsAny <Expression <Func <ReliefRequisitionDetail, bool> > >(), It.IsAny <Func <IQueryable <ReliefRequisitionDetail>, IOrderedQueryable <ReliefRequisitionDetail> > >(), It.IsAny <string>())).Returns(
                (Expression <Func <ReliefRequisitionDetail, bool> > predicate, Func <IQueryable <ReliefRequisitionDetail>, IOrderedQueryable <ReliefRequisitionDetail> > filter, string str) =>
            {
                return(_reliefRequisitions.First().ReliefRequisitionDetails.AsQueryable());
            }
                );

            mockUnitOfWork.Setup(t => t.ReliefRequisitionDetailRepository).Returns(
                mockReliefRequisionDetailRepository.Object);

            var mockTransportBidWinnerDetailRepository = new Mock <IGenericRepository <BidWinner> >();

            mockTransportBidWinnerDetailRepository.Setup(t => t.Get(It.IsAny <Expression <Func <BidWinner, bool> > >(), It.IsAny <Func <IQueryable <BidWinner>, IOrderedQueryable <BidWinner> > >(), It.IsAny <string>())).Returns(_transportBidWinners.AsQueryable());

            mockUnitOfWork.Setup(t => t.BidWinnerRepository).Returns(
                mockTransportBidWinnerDetailRepository.Object);

            mockUnitOfWork.Setup(t => t.ReliefRequisitionRepository).Returns(mockReliefRequisitionRepository.Object);

            var hubAllocationRepository = new Mock <IGenericRepository <HubAllocation> >();

            hubAllocationRepository.Setup(t => t.FindBy(It.IsAny <Expression <Func <HubAllocation, bool> > >())).Returns(_hubAllocation);
            mockUnitOfWork.Setup(t => t.HubAllocationRepository).Returns(hubAllocationRepository.Object);
            var transportOrderRepository =
                new Mock <IGenericRepository <TransportOrder> >();

            transportOrderRepository.Setup(
                t => t.Get(It.IsAny <Expression <Func <TransportOrder, bool> > >(), It.IsAny <Func <IQueryable <TransportOrder>, IOrderedQueryable <TransportOrder> > >(), It.IsAny <string>())).Returns(
                _transportOrders.AsQueryable());

            transportOrderRepository.Setup(t => t.Add(It.IsAny <TransportOrder>())).Returns(true);
            mockUnitOfWork.Setup(t => t.TransportOrderRepository).Returns(transportOrderRepository.Object);

            var transportOrderDetailRepository = new Mock <IGenericRepository <TransportOrderDetail> >();

            transportOrderDetailRepository.Setup(
                t =>
                t.Get(It.IsAny <Expression <Func <TransportOrderDetail, bool> > >(),
                      It.IsAny <Func <IQueryable <TransportOrderDetail>, IOrderedQueryable <TransportOrderDetail> > >(),
                      It.IsAny <string>())).Returns(new List <TransportOrderDetail>()
            {
                new TransportOrderDetail()
                {
                    CommodityID       = 1, FdpID = 1, DonorID = 1, RequisitionID = 1, QuantityQtl = 1, SourceWarehouseID = 1,
                    ReliefRequisition = new ReliefRequisition
                    {
                        ProgramID     = 1,
                        Round         = 1,
                        Month         = 1,
                        RequisitionID = 1,
                        RequisitionNo = "1"
                    }
                }
            });
            mockUnitOfWork.Setup(t => t.TransportOrderDetailRepository).Returns(transportOrderDetailRepository.Object);

            var transportRequisition = new Mock <IGenericRepository <TransportRequisition> >();

            transportRequisition.Setup(
                t =>
                t.Get(It.IsAny <Expression <Func <TransportRequisition, bool> > >(),
                      It.IsAny <Func <IQueryable <TransportRequisition>, IOrderedQueryable <TransportRequisition> > >(),
                      It.IsAny <string>())).Returns(_transportRequisitons);

            mockUnitOfWork.Setup(t => t.TransportRequisitionRepository).Returns(transportRequisition.Object);
            mockUnitOfWork.Setup(t => t.Save());

            var transportRequisitionDetailRepository = new Mock <IGenericRepository <TransportRequisitionDetail> >();

            transportRequisitionDetailRepository.Setup(t => t.Get(It.IsAny <Expression <Func <TransportRequisitionDetail, bool> > >(), It.IsAny <Func <IQueryable <TransportRequisitionDetail>, IOrderedQueryable <TransportRequisitionDetail> > >(), It.IsAny <string>())).Returns(
                (Expression <Func <TransportRequisitionDetail, bool> > predicate, Func <IQueryable <TransportRequisition>, IOrderedQueryable <TransportRequisition> > filter, string includeProp) =>
            {
                return(_tranportRequisitionDetail);
            });
            mockUnitOfWork.Setup(t => t.TransportRequisitionDetailRepository).Returns(
                transportRequisitionDetailRepository.Object);
            var applicationSettingRepository = new Mock <IGenericRepository <ApplicationSetting> >();

            applicationSettingRepository.Setup(t => t.FindBy(It.IsAny <Expression <Func <ApplicationSetting, bool> > >())).Returns(new List <ApplicationSetting>()
            {
                new ApplicationSetting()
                {
                    SettingID    = 1,
                    SettingName  = "CurrentBid",
                    SettingValue = "1"
                }
            });
            mockUnitOfWork.Setup(t => t.ApplicationSettingRepository).Returns(applicationSettingRepository.Object);
            ;
            var bidRepository = new Mock <IGenericRepository <Bid> >();

            bidRepository.Setup(t => t.FindById(It.IsAny <int>())).Returns(new Bid()
            {
                BidID = 1, BidNumber = "Bid-001"
            });


            mockUnitOfWork.Setup(t => t.BidRepository).Returns(bidRepository.Object);
            var transporterRepository = new Mock <IGenericRepository <Transporter> >();

            transporterRepository.Setup(t => t.FindById(It.IsAny <int>())).Returns(new Transporter()
            {
                TransporterID = 1,
                Name          = "TRANS"
            });
            mockUnitOfWork.Setup(t => t.TransporterRepository).Returns(transporterRepository.Object);
            var dispatchAllocationRepository = new Mock <IGenericRepository <DispatchAllocation> >();

            dispatchAllocationRepository.Setup(t => t.Add(It.IsAny <DispatchAllocation>())).Returns(true);
            mockUnitOfWork.Setup(t => t.DispatchAllocationRepository).Returns(dispatchAllocationRepository.Object);

            var sipcAllocationRepository = new Mock <IGenericRepository <SIPCAllocation> >();

            sipcAllocationRepository.Setup(t => t.FindBy(It.IsAny <Expression <Func <SIPCAllocation, bool> > >())).Returns(new List <SIPCAllocation>());
            mockUnitOfWork.Setup(t => t.SIPCAllocationRepository).Returns(sipcAllocationRepository.Object);
            var transporterService = new Mock <ITransporterService>();

            transporterService.Setup(t => t.GetBidWinner(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())).Returns(new List <BidWinner>()
            {
                new BidWinner()
                {
                    BidID         = 1,
                    DestinationID = 1,
                    Position      = 1,
                    SourceID      = 1,
                    Tariff        = 1,
                    TransporterID = 1
                }
            });
            _notificationService   = new NotificationService(unitOfWorkNotify.Object);
            _transportOrderService = new TransportOrderService(mockUnitOfWork.Object, transporterService.Object, _notificationService);
            //Act
        }
Beispiel #54
0
 public NotificationsController(INotificationService notificationService, ILogger <NotificationsController> logger)
 {
     _notificationService = notificationService;
     _logger = logger;
 }
Beispiel #55
0
 public NotificationsController(IEventService eventService, INotificationService notificationService)
 {
     _eventService        = eventService;
     _notificationService = notificationService;
 }
 public ImageNotificationController(INotificationService notificationService)
 {
     _notificationService = notificationService;
 }
Beispiel #57
0
 public ReferenceController(IReferenceRepository referenceRepository, INotificationService notificationService)
 {
     _referenceRepository = referenceRepository;
     _notificationService = notificationService;
 }
 public NotificationController(INotificationService notificationService, UserManager <ApplicationUser> userManager)
 {
     _notificationService = notificationService;
     _userManager         = userManager;
 }
Beispiel #59
0
 /// <summary>
 /// Initializes a new instance of the CommunityController class.
 /// </summary>
 /// <param name="communityService">Instance of community Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public CommunityController(ICommunityService communityService, IProfileService profileService, INotificationService queueService, IBlobService blobService, IContentService contentService)
     : base(profileService)
 {
     _communityService    = communityService;
     _notificationService = queueService;
     _blobService         = blobService;
     _contentService      = contentService;
 }
Beispiel #60
0
 public CategoryService(ICategoryRepository categoryRepository, INotificationService notificationService, IMapper mapper)
 {
     _categoryRepository  = categoryRepository;
     _notificationService = notificationService;
     _mapper = mapper;
 }