コード例 #1
0
        public PhotosApiController(
            IPhotosService photosService,
            IFeedbackService feedbackService,
            IUsersService usersService,
            ISystem system,
            ITextSplitter textSplitter,
            ILogWriterFactory loggerFactory)
        {
            if (textSplitter is null)
            {
                throw new ArgumentNullException(nameof(textSplitter));
            }

            if (loggerFactory is null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            this.photosService   = photosService ?? throw new ArgumentNullException(nameof(photosService));
            this.feedbackService = feedbackService ?? throw new ArgumentNullException(nameof(feedbackService));
            this.usersService    = usersService ?? throw new ArgumentNullException(nameof(usersService));
            this.system          = system ?? throw new ArgumentNullException(nameof(system));
            logger     = loggerFactory.CreateLogger <PhotosApiController>();
            lazyClaims = new Lazy <Claim[]>(() => GetUserClaims());

            var staticAssetHost = new Uri(system.Environment.GetVariable(Constants.EnvironmentVariables.StaticAssetHost));

            this.photoModelConverter = new PhotoModelConverter(staticAssetHost, textSplitter, loggerFactory);
            AWSSDKHandler.RegisterXRayForAllServices();
        }
コード例 #2
0
ファイル: Provider.cs プロジェクト: lurienanofab/lnf
        }                                             // I give up.

        public Provider(
            IAuthorizationService authorization,
            ILoggingService log,
            IControlService control,
            IDataService data,
            IBillingService billing,
            IInventoryService inventory,
            IOrderingService ordering,
            IStoreService store,
            IMailService mail,
            IPhysicalAccessService physicalAccess,
            ISchedulerService scheduler,
            IFeedbackService feedback,
            IReportingService reporting,
            IWorkerService worker,
            IProviderUtility utility,
            IDataAccessService dataAccess)
        {
            Authorization  = authorization;
            Log            = log;
            Control        = control;
            Data           = data;
            Billing        = billing;
            Inventory      = inventory;
            Ordering       = ordering;
            Store          = store;
            Mail           = mail;
            PhysicalAccess = physicalAccess;
            Scheduler      = scheduler;
            Feedback       = feedback;
            Reporting      = reporting;
            Worker         = worker;
            Utility        = utility;
            DataAccess     = dataAccess;
        }
コード例 #3
0
ファイル: AdminController.cs プロジェクト: git-martin/yilehao
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="feedbackService"></param>
 /// <param name="storageFileService"></param>
 /// <param name="currencyService"></param>
 /// <param name="userContainer"></param>
 public AdminController(IFeedbackService feedbackService, IStorageFileService storageFileService, ICurrencyService currencyService, IUserContainer userContainer)
 {
     _feedbackService    = feedbackService;
     _storageFileService = storageFileService;
     _currencyService    = currencyService;
     _userContainer      = userContainer;
 }
コード例 #4
0
 public ContactController(IErrorService errorService
                          , IContactDetailService contactDetailService
                          , IFeedbackService feedbackService) : base(errorService)
 {
     this._contactDetailService = contactDetailService;
     this._feedbackService      = feedbackService;
 }
コード例 #5
0
 public LifeController(UserManager <User> userManager, ILifeService lifeService, IFeedbackService feedbackService, IMapper mapper)
 {
     _userManager     = userManager;
     _lifeService     = lifeService;
     _feedbackService = feedbackService;
     _mapper          = mapper;
 }
コード例 #6
0
 public HomeController(IPageService pageService, IPostService postService, IFeedbackService feedbackService, ISettingService settingService)
 {
     this.pageService     = pageService;
     this.postService     = postService;
     this.settingService  = settingService;
     this.feedbackService = feedbackService;
 }
コード例 #7
0
 public PromotionController(ILogger <PromotionController> logger, IPromotionService promotionService, IPlaceService placeService, IFeedbackService feedbackService)
 {
     _promotionService = promotionService;
     _placeService     = placeService;
     _feedbackService  = feedbackService;
     _logger           = logger;
 }
コード例 #8
0
 public FeedbackController(
     IFeedbackService feedbackService,
     UserManager <ApplicationUser> userManager)
 {
     this.feedbackService = feedbackService;
     this.userManager     = userManager;
 }
コード例 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsViewModel"/> class.
        /// </summary>
        public SettingsViewModel(
            INavigationService navigationService,
            ILanguageService languageService,
            ISvgIconService svgIconService,
            IThemeService themeService,
            IBaseUrlService webviewBaseUrl,
            ISettingsService settingsService,
            IStoryBoardService storyBoardService,
            IFeedbackService feedbackService,
            ICloudStorageClientFactory cloudStorageClientFactory,
            IFilePickerService filePickerService)
            : base(navigationService, languageService, svgIconService, themeService, webviewBaseUrl)
        {
            _settingsService           = settingsService;
            _storyBoardService         = storyBoardService;
            _feedbackService           = feedbackService;
            _cloudStorageClientFactory = cloudStorageClientFactory;
            _filePickerService         = filePickerService;
            _fontSizeConverter         = new SliderStepConverter(ReferenceFontSize, 1.0);
            _noteMaxHeightConverter    = new SliderStepConverter(ReferenceNoteMaxSize, 20.0);
            Model = _settingsService.LoadSettingsOrDefault();

            EncryptionAlgorithms = new List <DropdownItemViewModel>();
            FillAlgorithmList(EncryptionAlgorithms);

            // Initialize commands
            GoBackCommand = new RelayCommand(GoBack);
            ChangeCloudSettingsCommand = new RelayCommand(ChangeCloudSettings);
            ClearCloudSettingsCommand  = new RelayCommand(ClearCloudSettings);
            TestNewLocalizationCommand = new RelayCommand(TestNewLocalization);
        }
コード例 #10
0
 public FeedbacksController(IFeedbackService feedbackService, IOrderService orderService, ICustomerService customerService, ISchoolService schoolService)
 {
     this.feedbackService = feedbackService;
     this.orderService    = orderService;
     this.customerService = customerService;
     this.schoolService   = schoolService;
 }
コード例 #11
0
 public FeedbackDialogModel(string applicationName, IFeedbackService feedbackService)
 {
     this.feedbackService      = feedbackService;
     this.feedbackChoice       = feedbackService.AggregateFeedbackPolicy;
     this.canSetFeedbackPolicy = feedbackService.CanSetFeedbackPolicy;
     this.applicationName      = applicationName;
 }
コード例 #12
0
        /// <inheritdoc/>
        public ShortenedNoteViewModel(
            INavigationService navigationService,
            ILanguageService languageService,
            ISvgIconService svgIconService,
            IThemeService themeService,
            IBaseUrlService webviewBaseUrl,
            SearchableHtmlConverter searchableTextConverter,
            IRepositoryStorageService repositoryService,
            IFeedbackService feedbackService,
            ISettingsService settingsService,
            ICryptor cryptor,
            SafeListModel safes,
            NoteModel noteFromRepository)
            : base(navigationService, languageService, svgIconService, themeService, webviewBaseUrl, searchableTextConverter, repositoryService, feedbackService, settingsService, cryptor, safes, noteFromRepository)
        {
            if (_unlockedContent != null)
            {
                // Create a short version for large notes, with only the first part of the note.
                // This is a performance improvement if there are large notes in the repository.
                HtmlShortener shortener = new HtmlShortener();
                shortener.WantedLength    = 600; // Should be enough even for settings with
                shortener.WantedTagNumber = 20;  // small font and very height notes.

                string shortenedContent = shortener.Shorten(_unlockedContent);
                if (shortenedContent.Length != _unlockedContent.Length)
                {
                    // Because the note will be truncated, we have to build the searchable content
                    // first, before overwriting the original content.
                    string dummy = SearchableContent;
                    _unlockedContent = shortenedContent;
                }
            }
        }
コード例 #13
0
        public MessageController(ILuisService luis,
                                 IAnswerService answerService,
                                 IUnknownService issueService,
                                 IRedisCachingProvider redis,
                                 DingTalkHelper ddHelper,
                                 IDepartmentService departmentService,
                                 IPermissionService permissionService,
                                 IConfiguration configuration,
                                 IFeedbackService feedbackService,
                                 IAppSettings settings,
                                 ILogger <MessageController> logger,
                                 KnowledgeMapContext mapContext,
                                 DingDingApprovalService dingDingApprovalService)
        {
            _logger            = logger;
            _settings          = settings;
            _ddHelper          = ddHelper;
            _configuration     = configuration;
            _ddApprovalService = dingDingApprovalService;
            _luis              = luis;
            _answerService     = answerService;
            _issueService      = issueService;
            _departService     = departmentService;
            _redis             = redis;
            _feedbackService   = feedbackService;
            _permissionService = permissionService;
            _httpClient        = HttpClientFactory.Create();

            _mapContext = mapContext;
        }
コード例 #14
0
 public FeedbackController(
     ICarrierService carrierService,
     IFeedbackService feedbackService)
 {
     _feedbackService = feedbackService;
     _carrierService  = carrierService;
 }
コード例 #15
0
 public AccountController(ILogger <AccountController> logger, IUserService userService, IFeedbackService feedbackService, IPromotionService promotionService)
 {
     _logger           = logger;
     _userService      = userService;
     _feedbackService  = feedbackService;
     _promotionService = promotionService;
 }
コード例 #16
0
 public FeedbackController(
     IContext context,
     IFeedbackService feedbackService
     ) : base(context)
 {
     this.feedbackService = feedbackService;
 }
コード例 #17
0
 // Hotel controller constructor
 public BaseController(
     IHotelService hotelServ,
     IFeedbackService feedbackServ)
 {
     hotelService    = hotelServ;
     feedbackService = feedbackServ;
 }
コード例 #18
0
 public RequestHelpAPIController(ILogger <RequestHelpAPIController> logger, IRequestService requestService, IAuthService authService, IFeedbackService feedbackService)
 {
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _requestService  = requestService ?? throw new ArgumentNullException(nameof(requestService));
     _authService     = authService ?? throw new ArgumentNullException(nameof(authService));
     _feedbackService = feedbackService ?? throw new ArgumentNullException(nameof(feedbackService));
 }
コード例 #19
0
 public FeedbackController(ILogger <ManageController> logger, IFeedbackService feedbackService, IPlaceService placeService, IPanelUserService panelUserService)
 {
     _logger           = logger;
     _feedbackService  = feedbackService;
     _placeService     = placeService;
     _panelUserService = panelUserService;
 }
コード例 #20
0
 public FeedbackController(IFeedbackService feedbackService, IAuthorizationService authorizationService,
                           SignInManager <AppUser> signInManager)
 {
     _feedbackService      = feedbackService;
     _authorizationService = authorizationService;
     _signInManager        = signInManager;
 }
コード例 #21
0
        public RatingViewModel(
            ITimeService timeService,
            ITogglDataSource dataSource,
            IRatingService ratingService,
            IFeedbackService feedbackService,
            IAnalyticsService analyticsService,
            IOnboardingStorage onboardingStorage,
            IMvxNavigationService navigationService)
        {
            Ensure.Argument.IsNotNull(dataSource, nameof(dataSource));
            Ensure.Argument.IsNotNull(timeService, nameof(timeService));
            Ensure.Argument.IsNotNull(ratingService, nameof(ratingService));
            Ensure.Argument.IsNotNull(feedbackService, nameof(feedbackService));
            Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService));
            Ensure.Argument.IsNotNull(onboardingStorage, nameof(onboardingStorage));
            Ensure.Argument.IsNotNull(navigationService, nameof(navigationService));

            this.dataSource        = dataSource;
            this.timeService       = timeService;
            this.ratingService     = ratingService;
            this.feedbackService   = feedbackService;
            this.analyticsService  = analyticsService;
            this.onboardingStorage = onboardingStorage;
            this.navigationService = navigationService;

            Impression     = impressionSubject.AsObservable();
            CtaTitle       = Impression.Select(ctaTitle);
            CtaDescription = Impression.Select(ctaDescription);
            CtaButtonTitle = Impression.Select(ctaButtonTitle);
        }
コード例 #22
0
        public OpenSafeViewModel(
            INavigationService navigationService,
            ILanguageService languageService,
            ISvgIconService svgIconService,
            IThemeService themeService,
            IBaseUrlService webviewBaseUrl,
            IFeedbackService feedbackService,
            ICryptoRandomService randomService,
            ISettingsService settingsService,
            IRepositoryStorageService repositoryService,
            Navigation navigationTarget)
            : base(navigationService, languageService, svgIconService, themeService, webviewBaseUrl)
        {
            _feedbackService   = feedbackService ?? throw new ArgumentNullException(nameof(feedbackService));
            _randomService     = randomService;
            _settingsService   = settingsService;
            _repositoryService = repositoryService;
            _navigationTarget  = navigationTarget;

            _repositoryService.LoadRepositoryOrDefault(out NoteRepositoryModel noteRepository);
            Model = noteRepository;

            GoBackCommand    = new RelayCommand(GoBack);
            CancelCommand    = new RelayCommand(Cancel);
            OkCommand        = new RelayCommand(Ok);
            ResetSafeCommand = new RelayCommand(ResetSafe);
        }
コード例 #23
0
 public LoadFeedbacksCommand(FeedbacksViewModel viewModel,
                             IFeedbackService feedbackService,
                             IAuthenticationService authenticationService) : base(viewModel, authenticationService)
 {
     _viewModel       = viewModel;
     _feedbackService = feedbackService;
 }
コード例 #24
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NoteViewModel"/> class.
        /// </summary>
        public NoteViewModel(
            INavigationService navigationService,
            ILanguageService languageService,
            ISvgIconService svgIconService,
            IThemeService themeService,
            IBaseUrlService webviewBaseUrl,
            SearchableHtmlConverter searchableTextConverter,
            IRepositoryStorageService repositoryService,
            IFeedbackService feedbackService,
            ISettingsService settingsService,
            ICryptor cryptor,
            SafeListModel safes,
            NoteModel noteFromRepository)
            : base(navigationService, languageService, svgIconService, themeService, webviewBaseUrl)
        {
            _repositoryService       = repositoryService;
            _feedbackService         = feedbackService;
            _settingsService         = settingsService;
            _searchableTextConverter = searchableTextConverter;
            _cryptor = cryptor;
            _safes   = safes;
            MarkSearchableContentAsDirty();
            PushNoteToOnlineStorageCommand   = new RelayCommand(PushNoteToOnlineStorage);
            PullNoteFromOnlineStorageCommand = new RelayCommand(PullNoteFromOnlineStorage);
            ToggleShoppingModeCommand        = new RelayCommand(ToggleShoppingMode);
            GoBackCommand = new RelayCommand(GoBack);

            Model            = noteFromRepository;
            _unlockedContent = IsInSafe ? UnlockIfSafeOpen(Model.HtmlContent) : Model.HtmlContent;
        }
コード例 #25
0
 /// <summary>
 /// Checks the type of the exception and shows an appropriate error message.
 /// </summary>
 /// <param name="ex">Exception to handle.</param>
 /// <param name="feedbackService">Dialog service to show the error message.</param>
 /// <param name="languageService">The language service.</param>
 public static void ShowExceptionMessage(Exception ex, IFeedbackService feedbackService, ILanguageService languageService)
 {
     if (ex is ConnectionFailedException)
     {
         feedbackService.ShowToast(languageService["sync_error_connection"]);
     }
     else if (ex is AccessDeniedException)
     {
         feedbackService.ShowToast(languageService["sync_error_privileges"]);
     }
     else if (ex is CryptoExceptionInvalidCipherFormat)
     {
         feedbackService.ShowToast(languageService["sync_error_repository"]);
     }
     else if (ex is CryptoUnsupportedRevisionException)
     {
         feedbackService.ShowToast(languageService["sync_error_revision"]);
     }
     else if (ex is SynchronizationStoryBoard.UnsuportedRepositoryRevisionException)
     {
         feedbackService.ShowToast(languageService["sync_error_revision"]);
     }
     else
     {
         feedbackService.ShowToast(languageService["sync_error_generic"]);
     }
 }
コード例 #26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RecycleBinViewModel"/> class.
        /// </summary>
        public RecycleBinViewModel(
            INavigationService navigationService,
            ILanguageService languageService,
            ISvgIconService svgIconService,
            IThemeService themeService,
            IBaseUrlService webviewBaseUrl,
            IFeedbackService feedbackService,
            ISettingsService settingsService,
            ICryptoRandomSource randomSource,
            IRepositoryStorageService repositoryService)
            : base(navigationService, languageService, svgIconService, themeService, webviewBaseUrl)
        {
            _feedbackService   = feedbackService;
            _settingsService   = settingsService;
            _repositoryService = repositoryService;
            _noteCryptor       = new Cryptor(NoteModel.CryptorPackageName, randomSource);
            RecycledNotes      = new List <NoteViewModel>();

            _repositoryService.LoadRepositoryOrDefault(out NoteRepositoryModel noteRepository);
            Model = noteRepository;

            // Initialize commands
            GoBackCommand          = new RelayCommand(GoBack);
            RestoreNoteCommand     = new RelayCommand <object>(RestoreNote);
            EmptyRecycleBinCommand = new RelayCommand(EmptyRecycleBin);
        }
コード例 #27
0
ファイル: ProcessController.cs プロジェクト: supkevin/CDMS
        public ProcessController(IInspectionService inspetionService,
                                 IProcessService processService,
                                 IOverSeaService overseaService,
                                 ICountryService countryService,
                                 IStoreService storeService,
                                 IWorkplaceService workplaceService,
                                 IFeedbackService feedbackService,
                                 IObservationService observationService,
                                 ITrackService trackService
                                 )
        {
            this._inspetionService = inspetionService;
            this._processService   = processService;

            this._overseaService     = overseaService;
            this._countryService     = countryService;
            this._storeService       = storeService;
            this._workplaceService   = workplaceService;
            this._feedbackService    = feedbackService;
            this._observationService = observationService;
            this._trackService       = trackService;

            // 目前登入者可用權限
            this._UserPermission = new UserPermission(storeService, workplaceService);
        }
コード例 #28
0
 public FeedbackController(IFeedbackService _feedbackService,
                           IProductService _prodService, IAuthService _authService)
 {
     this.feedbackService = _feedbackService;
     this.productService  = _prodService;
     this.authService     = _authService;
 }
コード例 #29
0
 public FeedbackController(IFeedbackService feedbackService, IMapper mapper, IUriService uriService, IHttpContextAccessor httpContextAccessor)
 {
     _feedbackService     = feedbackService;
     _mapper              = mapper;
     _uriService          = uriService;
     _httpContextAccessor = httpContextAccessor;
 }
コード例 #30
0
 public UserController(IUserService userService, IClassifiedService classifiedService, IReportService reportService, IFeedbackService feedbackService)
 {
     _userService       = userService;
     _classifiedService = classifiedService;
     _reportService     = reportService;
     _feedbackService   = feedbackService;
 }
コード例 #31
0
        public MainViewModel(IDialogService dialogService, IFeedbackService feedbackService, IWindowManager windowManager, FramePanelViewModel framePanel, ControlPanelViewModel controlPanel, StatusBarViewModel statusBar)
        {
            DisplayName = "WebcamMouseController";

            DialogService = dialogService;
            FeedbackService = feedbackService;
            WindowManager = windowManager;

            FramePanel = framePanel;
            ControlPanel = controlPanel;
            StatusBar = statusBar;
        }
コード例 #32
0
        /// <summary>
        /// Initializes a new instance of the DispatchedFeedbackService class
        /// </summary>
        /// <param name="wrappedService">the wrapped service</param>
        /// <param name="dispatcher">the thread dispatcher</param>
        public DispatchedFeedbackService(IFeedbackService wrappedService, Dispatcher dispatcher)
            : base(dispatcher)
        {
            if (wrappedService == null)
            {
                throw new ArgumentNullException("wrappedService");
            }

            this.wrappedService = wrappedService;

            this.wrappedService.GetFeedbackAsBuyerCompleted += (s, e) => this.DispatchEvent(this.GetFeedbackAsBuyerCompleted, s, e);
            this.wrappedService.GetFeedbackAsSellerCompleted += (s, e) => this.DispatchEvent(this.GetFeedbackAsSellerCompleted, s, e);
            this.wrappedService.GetFeedbackCompleted += (s, e) => this.DispatchEvent(this.GetFeedbackCompleted, s, e);
            this.wrappedService.GetFeedbackForOthersCompleted += (s, e) => this.DispatchEvent(this.GetFeedbackForOthersCompleted, s, e);
            this.wrappedService.GetFeedbackForUserCompleted += (s, e) => this.DispatchEvent(this.GetFeedbackForUserCompleted, s, e);
        }
コード例 #33
0
 public AjaxControllerBuilder()
 {
     _feedbackService = null;
 }
コード例 #34
0
 public VideoFileInputViewModel(IFeedbackService feedbackService, IDialogService dialogService)
     : this()
 {
     FeedbackService = feedbackService;
     DialogService = dialogService;
 }
コード例 #35
0
 public FeedbackAdminController(IFeedbackService feedback)
 {
     this.feedback = feedback;
 }
コード例 #36
0
        private static void SaveFeedback(IFeedbackService feedbackService, ReviewConfiguration review,
            AssessmentInfo assessment, int rating, string category)
        {
            var userNameReviewer = assessment.Reviewer == "(me)" ? DefaultUserName : assessment.Reviewer;
            var userNameReviewedPeer = assessment.ReviewedPeer == "(me)" ? DefaultUserName : assessment.ReviewedPeer;

            feedbackService.SaveFeedback(review.Peers.First(p => p.UserName == userNameReviewer).EmailAddress,
                                         GetFeedback(review, rating, category,
                                                     review.Peers.First(p => p.UserName == userNameReviewedPeer)));
        }
コード例 #37
0
 public FeedbackController(IFeedbackService feedbackService)
 {
     _feedbackService = feedbackService;
 }
コード例 #38
0
 public AdminControllerBuilder()
 {
     _formAuthenticationService = null;
     _userService = null;
     _feedbackService = null;
 }
コード例 #39
0
 internal AdminControllerBuilder WithFeedbacService(IFeedbackService feedbackService)
 {
     _feedbackService = feedbackService;
     return this;
 }
コード例 #40
0
ファイル: FeedbackController.cs プロジェクト: Budzyn/hunter
 public FeedbackController(IFeedbackService feedbackService, ITestService testService)
 {
     _feedbackService = feedbackService;
     _testService = testService;
 }
コード例 #41
0
 public LiveStreamInputViewModel(IFeedbackService feedbackService, IDialogService dialogService)
     : this()
 {
     FeedbackService = feedbackService;
     DialogService = dialogService;
 }
コード例 #42
0
 public FeedbackController(IFeedbackService feedbackService, IPETianoService petianoService)
 {
     this._FeedbackService = feedbackService;
     this._PETianoService = petianoService;
 }
コード例 #43
0
 public AdminController(IUserService userService, IFeedbackService feedbackService)
 {
     _userService = userService;
     _feedbackService = feedbackService;
 }