コード例 #1
0
        public SearchController(IResourceService resourceService, IUserService userService, IProfileService profileService, ISearchService searchService, IStateService stateService, IConversationService conversationService)
            : base(resourceService, userService, profileService, stateService, conversationService)
        {
            _searchService = searchService;
            ResourceService = resourceService;

        }
コード例 #2
0
 public HomeController()
 {
     var dictionary = new ModelStateWrapper(ModelState);
     _facade = new UserFacade(dictionary);
     _profileService = new ProfileService(dictionary);
     _ctx = new CurrentContext();
 }
コード例 #3
0
 public ManagePrivacyPresenter()
 {
     _profileService = ObjectFactory.GetInstance<IProfileService>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     account = _userSession.CurrentUser;
     profile = _profileService.LoadProfileByAccountID(account.AccountID);
 }
コード例 #4
0
ファイル: SetupService.cs プロジェクト: andyliyuze/POPForums
		public SetupService(ISetupRepository setupRepository, IUserService userService, ISettingsManager settingsManager, IProfileService profileService)
		{
			_setupRepository = setupRepository;
			_userService = userService;
			_settingsManager = settingsManager;
			_profileService = profileService;
		}
コード例 #5
0
ファイル: HomePresenter.cs プロジェクト: SPKT/MangXaHoi
 public HomePresenter()
 {
     _userSession = new UserSession();
     _accountService=new AccountService();
     _redirector = new Redirector();
     _profileService = new ProfileService();
 }
コード例 #6
0
 public TransactionService(IValidationDictionary validationDictionary)
 {
     _validationDictionary = validationDictionary;
     _repository = new EntityTransactionRepository();
     PaymentMethodService = new PaymentMethodService(validationDictionary);
     _profileService = new ProfileService(validationDictionary);
 }
コード例 #7
0
 public ProfileController()
 {
     IValidationDictionary validationDictionary = new ModelStateWrapper(ModelState);
     _service = new ProfileService(validationDictionary);
     _sshService = new SshProfileService(validationDictionary);
     _poolService = new PoolService(validationDictionary);
 }
コード例 #8
0
 //todo  : add Authorize parameters
 public TestController(ITestService tService, ICourseService cService, IProfileService pService, IJournalService jService)
 {
     _testService = tService;
     _courseService = cService;
     _profileService = pService;
     _journalService = jService;
 }
コード例 #9
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;
 }
コード例 #10
0
ファイル: EntityController.cs プロジェクト: faorg/wwt-website
 /// <summary>
 /// Initializes a new instance of the EntityController class.
 /// </summary>
 /// <param name="entityService">Instance of Entity Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public EntityController(IEntityService entityService, IProfileService profileService, ICommunityService communityService,INotificationService notificationService)
     : base(profileService)
 {
     _entityService = entityService;
     _notificationService = notificationService;
     _communityService = communityService;
 }
コード例 #11
0
 public CourseController(ICourseService courseService, IProfileService profileService, ILearningMaterialService learningService)
 {
     _courseService = courseService;
     _profileService = profileService;
     _learningService = learningService;
     _courseServiceExternal = new CourseServiceExternal.CourseServiceClient();
 }
コード例 #12
0
 public UserProfilePresenter()
 {
     _alertService = new AlertService();
     _profileService = new ProfileService();
     _userSession = new UserSession();
     _webContext = new WebContext();
     _accountService = new AccountService();
 }
コード例 #13
0
        public UserController()
        {
            _photoservice = new PhotoService(new PhotoRepository(_context));
            _profileservice = new ProfileService(new ProfilesRepository(_context), new UsersRepository(_context));
            _sendservice = new UsersService(new UsersRepository(_context));
            _usersservice = new UsersService(new RemindingRepository(_context));

        }
コード例 #14
0
		public EventPublisher(IEventDefinitionService eventDefinitionService, IPointLedgerRepository pointLedgerRepository, IFeedService feedService, IAwardCalculator awardCalculator, IProfileService profileService)
		{
			_eventDefinitionService = eventDefinitionService;
			_pointLedgerRepository = pointLedgerRepository;
			_feedService = feedService;
			_awardCalculator = awardCalculator;
			_profileService = profileService;
		}
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RegistrationService" /> class.
 /// </summary>
 /// <param name="membershipService">The membership service.</param>
 /// <param name="profileService">The profile service.</param>
 /// <param name="roleRepository">The role repository.</param>
 /// <param name="userRoleRepository">The user role repository.</param>
 public RegistrationService(IMembershipService membershipService, IProfileService profileService,
     IRoleRepository roleRepository, IUserRoleRepository userRoleRepository)
 {
     this.membershipService = membershipService;
     this.profileService = profileService;
     this.roleRepository = roleRepository;
     this.userRoleRepository = userRoleRepository;
 }
コード例 #16
0
 public ProfileController(IProfileService pService, IUserService uService, ISkillAreaService sService, ISkillService skill, ISkillTypeService type)
 {
     this._skillAreaService = sService;
     this._profileService = pService;
     this._userService = uService;
     this._skillService = skill;
     this._skillTypeService = type;
 }
コード例 #17
0
 public EmployeeController(IUserService userService, IStoreService storeService, IProfileService profileService,
     IRoleService roleService)
 {
     _userService = userService;
     _storeService = storeService;
     _profileService = profileService;
     _roleService = roleService;
     _service = new Service(storeService, roleService);
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonService" /> class.
 /// </summary>
 /// <param name="personRepository">The person repository.</param>
 /// <param name="personFactory">The person factory.</param>
 /// <param name="verificationRepository">The verification repository.</param>
 /// <param name="emailService">The email service.</param>
 /// <param name="profileService">The profile service.</param>
 public PersonService(IPersonRepository personRepository, IPersonFactory personFactory,
     IUserVerificationRepository verificationRepository, IEmailService emailService, IProfileService profileService)
 {
     this.personRepository = personRepository;
     this.personFactory = personFactory;
     this.verificationRepository = verificationRepository;
     this.emailService = emailService;
     this.profileService = profileService;
 }
コード例 #19
0
 public UserController()
 {
     _ctx = new CurrentContext();
     validationDictionary = new ModelStateWrapper(ModelState);
     _facade = new UserFacade(validationDictionary);
     _sshSecretService = new SshSecretService(validationDictionary, true);
     _statusService = new StatusService(validationDictionary);
     _profileService = new ProfileService(validationDictionary);
 }
コード例 #20
0
ファイル: AccountService.cs プロジェクト: lengocluyen/pescode
 public AccountService()
 {
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _email = ObjectFactory.GetInstance<IEmail>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _profileService = ObjectFactory.GetInstance<IProfileService>();
     _friendService = ObjectFactory.GetInstance<IFriendService>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
 }
コード例 #21
0
 public AccountController(ITemplateService templateService, INotificationService notificationService, ISysConfig config, ICartContext cartContext, IProfileService profileService, IOrderService orderService)
 {
     _templateService = templateService;
     _notificationService = notificationService;
     _config = config;
     _cartContext = cartContext;
     _profileService = profileService;
     _orderService = orderService;
 }
コード例 #22
0
 public SampleGenerator(IProfileService profileService, IUserService userService, IPhotosService photosService, IConversationService conversationService, IVisitService visitService, IResourceService resourceService)
 {
     _profileService = profileService;
     _userService = userService;
     _photosService = photosService;
     _conversationService = conversationService;
     _visitService = visitService;
     _resourceService = resourceService;
 }
コード例 #23
0
 public ArticleController(IArticleService ars, IBlogService bs, ICommentService cs, ITagService ts, IProfileService ps, IUserService us)
 {
     artService = ars;
     blogService = bs;
     commentService = cs;
     tagService = ts;
     profileService = ps;
     userService = us;
 }
コード例 #24
0
        public MessengerServiceFacade()
        {
            //postSorter = postmaster;
            //TODO: Properly instantiate the WorkerProcess

            membershipHandle = new MembershipService();
            profileHandle = new ProfileService();

            postSorter = new WorkerProcess(new MessagingContext("Kalanjiyam"), membershipHandle, profileHandle);
        }
コード例 #25
0
 public ApiController(IResourceService resourceService, IUserService userService, IProfileService profileService, 
     IConversationService conversationService, IStateService stateService, IUtilityService utilityService,
     ISearchService searchService, IPhotosService photoService
     )
     : base(resourceService, userService, profileService, stateService, conversationService)
 {
     _searchService = searchService;
     _photoService = photoService;
     _utilityService = utilityService;
 }
コード例 #26
0
 protected KatushaBaseController(IResourceService resourceService, IUserService userService, IProfileService profileService, IStateService stateService, IConversationService conversationService)
 {
     ResourceService = resourceService;
     ConversationService = conversationService;
     ProfileService = profileService;
     UserService = userService;
     StateService = stateService;
     UniqueVisitorsResultConverter.GetInstance().ProfileService = profileService;
     ConversationResultTypeConverter.GetInstance().ProfileService = profileService;
 }
コード例 #27
0
 public SSHService(IValidationDictionary validationDictionary, ISSHRepository repository,
     IPPPSecretService pppSecretService, IProfileService pppProfileService,
     IPoolService poolService)
 {
     _validationDictionary = validationDictionary;
     _repository = repository;
     _pppSecretService = pppSecretService;
     _pppProfileService = pppProfileService;
     _poolService = poolService;
 }
コード例 #28
0
 public PhotosService(IKatushaGlobalCacheContext cacheContext, IKatushaFileSystem fileSystem, IProfileService profileService, INotificationService notificationService, IConversationService conversationService, IProfileRepositoryDB profileRepository, IPhotoRepositoryDB photoRepository, IPhotoBackupService photoBackupService)
 {
     _cacheContext = cacheContext;
     _fileSystem = fileSystem;
     _profileService = profileService;
     _notificationService = notificationService;
     _conversationService = conversationService;
     _profileRepository = profileRepository;
     _photoRepository = photoRepository;
     _photoBackupService = photoBackupService;
 }
コード例 #29
0
ファイル: BuyController.cs プロジェクト: jfvaleroso/Shoppe
 public BuyController(IProductService productService, ICustomerService customerService,
     IProfileService profileService, IUserService userService, IInvoiceService invoiceService,
     ISecurityCodeService securityCodeService)
 {
     _customerService = customerService;
     _profileService = profileService;
     _invoiceService = invoiceService;
     _securityCodeService = securityCodeService;
     _service = new Service(productService);
     _common = new Common(userService);
 }
コード例 #30
0
 public void SetUp()
 {
     Mock = new MockRepository();
     ProfileService = Mock.DynamicMock<IProfileService>();
     ProfileController = new ProfileController(ProfileService);
     Profile = new ProfileModelDto { ID = 1, Email = "*****@*****.**", Role = "admin", LoginName = "testuser" };
     ProfileList = new[]
         {
             new ProfileModelDto { ID=1},
             new ProfileModelDto { ID=2}
         };
 }
コード例 #31
0
 public ProfileController(IProfileService profileService, IHostingEnvironment hostingEnvironment)
 {
     this.profileService     = profileService;
     this.hostingEnvironment = hostingEnvironment;
 }
コード例 #32
0
        //private readonly IProfileService _profileService;

        public AuthController(IAuthService authService, IProfileService profileService)
        {
            _authService = authService;
            //_profileService = profileService;
        }
コード例 #33
0
 public ProfileController(IProfileService profileService, IAccountService accountService)
 {
     this.profileService = profileService;
     this.accountService = accountService;
 }
コード例 #34
0
ファイル: SwitchChooserVM.cs プロジェクト: daleghent/NINA
 public SwitchChooserVM(IProfileService profileService) : base(profileService)
 {
 }
コード例 #35
0
 public DockManagerVM(IProfileService profileService /*IEnumerable<DockableVM> dockWindowViewModels*/) : base(profileService)
 {
     LoadAvalonDockLayoutCommand = new RelayCommand(LoadAvalonDockLayout);
     ResetDockLayoutCommand      = new RelayCommand(ResetDockLayout, (object o) => _dockmanager != null);
 }
コード例 #36
0
 public MyInteractionResponseGenerator(ISystemClock clock, ILogger <AuthorizeInteractionResponseGenerator> logger, IConsentService consent, IProfileService profile)
     : base(clock, logger, consent, profile)
 {
 }
コード例 #37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TokenRequestValidator"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="authorizationCodeStore">The authorization code store.</param>
 /// <param name="resourceOwnerValidator">The resource owner validator.</param>
 /// <param name="profile">The profile.</param>
 /// <param name="extensionGrantValidator">The extension grant validator.</param>
 /// <param name="customRequestValidator">The custom request validator.</param>
 /// <param name="scopeValidator">The scope validator.</param>
 /// <param name="tokenValidator"></param>
 /// <param name="events">The events.</param>
 /// <param name="clock">The clock.</param>
 /// <param name="logger">The logger.</param>
 public TokenRequestValidator(IdentityServerOptions options, IAuthorizationCodeStore authorizationCodeStore, IResourceOwnerPasswordValidator resourceOwnerValidator, IProfileService profile, ExtensionGrantValidator extensionGrantValidator, ICustomTokenRequestValidator customRequestValidator, ScopeValidator scopeValidator, ITokenValidator tokenValidator, IEventService events, ISystemClock clock, ILogger <TokenRequestValidator> logger)
 {
     _logger  = logger;
     _options = options;
     _clock   = clock;
     _authorizationCodeStore = authorizationCodeStore;
     _resourceOwnerValidator = resourceOwnerValidator;
     _profile = profile;
     _extensionGrantValidator = extensionGrantValidator;
     _customRequestValidator  = customRequestValidator;
     _scopeValidator          = scopeValidator;
     _tokenValidator          = tokenValidator;
     _events = events;
 }
コード例 #38
0
        public NewDriveViewModel(INavigationService navigationService, IDriveServices driveService, IProfileService profileService, IRuntimeContext runtimeContext)
            : base(navigationService, runtimeContext)
        {
            _driveServices  = driveService;
            _profileService = profileService;

            BackCommand     = new Command(async() => await Back(), () => !IsBusy);
            NewDriveCommand = new Command(async() => await NewDrive(), () => !IsBusy);

            CarTypes = new List <string> {
                "Bez_Naznake, Car, Kombi"
            };
            CarType = "Bez_Naznake";
        }
コード例 #39
0
 /// <summary>Initializes a new instance of the <see cref="T:PL.Controllers.ProfileController"/> class.</summary>
 /// <param name="_myProfileService">My profile service.</param>
 public ProfileController(IProfileService _myProfileService)
 {
     myProfileService = _myProfileService;
 }
コード例 #40
0
 public UserEmailer(IProfileService profileService, ISettingsManager settingsManager, IQueuedEmailMessageRepository queuedEmailRepo)
 {
     _profileService        = profileService;
     _settingsManager       = settingsManager;
     _queuedQueuedEmailRepo = queuedEmailRepo;
 }
コード例 #41
0
 public NewDriveViewModel(INavigationService navigationService, IDriveServices driveService, IProfileService profileService)
     : this(navigationService, driveService, profileService, new RuntimeContext())
 {
 }
コード例 #42
0
 public ProfileController(IProfileService profileService, IImageService imageService)
 {
     ProfileService = profileService;
     ImageService   = imageService;
 }
コード例 #43
0
 public NotificationService(IProfileService profileService,
                            IAsyncRepository <Notification> notificationRepository)
 {
     _profileService         = profileService;
     _notificationRepository = notificationRepository;
 }
コード例 #44
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultClaimsProvider"/> class.
 /// </summary>
 /// <param name="users">The users service</param>
 public DefaultClaimsService(IProfileService profile, ILogger <DefaultClaimsService> logger)
 {
     _logger  = logger;
     _profile = profile;
 }
コード例 #45
0
 public TokenRequestValidator(IdentityServerOptions options, IPersistedGrantService grants, IResourceOwnerPasswordValidator resourceOwnerValidator, IProfileService profile, ExtensionGrantValidator extensionGrantValidator, ICustomTokenRequestValidator customRequestValidator, ScopeValidator scopeValidator, IEventService events, ILogger <TokenRequestValidator> logger)
 {
     _logger  = logger;
     _options = options;
     _grants  = grants;
     _resourceOwnerValidator = resourceOwnerValidator;
     _profile = profile;
     _extensionGrantValidator = extensionGrantValidator;
     _customRequestValidator  = customRequestValidator;
     _scopeValidator          = scopeValidator;
     _events = events;
 }
コード例 #46
0
        public FramingAssistantVM(IProfileService profileService, ICameraMediator cameraMediator, ITelescopeMediator telescopeMediator, IApplicationStatusMediator applicationStatusMediator) : base(profileService)
        {
            this.cameraMediator = cameraMediator;
            this.cameraMediator.RegisterConsumer(this);
            this.telescopeMediator         = telescopeMediator;
            this.applicationStatusMediator = applicationStatusMediator;

            Opacity = 0.2;

            SkyMapAnnotator = new SkyMapAnnotator(telescopeMediator);

            var defaultCoordinates = new Coordinates(0, 0, Epoch.J2000, Coordinates.RAType.Degrees);

            DSO = new DeepSkyObject(string.Empty, defaultCoordinates, profileService.ActiveProfile.ApplicationSettings.SkyAtlasImageRepository);

            FramingAssistantSource = profileService.ActiveProfile.FramingAssistantSettings.LastSelectedImageSource;

            CameraPixelSize = profileService.ActiveProfile.CameraSettings.PixelSize;
            FocalLength     = profileService.ActiveProfile.TelescopeSettings.FocalLength;

            _statusUpdate = new Progress <ApplicationStatus>(p => Status = p);

            LoadImageCommand = new AsyncCommand <bool>(async() => { return(await LoadImage()); });
            CancelLoadImageFromFileCommand = new RelayCommand((object o) => { CancelLoadImage(); });
            _progress = new Progress <int>((p) => DownloadProgressValue = p);
            CancelLoadImageCommand         = new RelayCommand((object o) => { CancelLoadImage(); });
            DragStartCommand               = new RelayCommand(DragStart);
            DragStopCommand                = new RelayCommand(DragStop);
            DragMoveCommand                = new RelayCommand(DragMove);
            ClearCacheCommand              = new RelayCommand(ClearCache, (object o) => Cache != null);
            RefreshSkyMapAnnotationCommand = new RelayCommand((object o) => SkyMapAnnotator.UpdateSkyMap(), (object o) => SkyMapAnnotator.Initialized);
            MouseWheelCommand              = new RelayCommand(MouseWheel);

            CoordsFromPlanetariumCommand = new AsyncCommand <bool>(() => Task.Run(CoordsFromPlanetarium));

            DeepSkyObjectSearchVM = new DeepSkyObjectSearchVM();
            DeepSkyObjectSearchVM.PropertyChanged += DeepSkyObjectSearchVM_PropertyChanged;

            SetSequenceCoordinatesCommand = new AsyncCommand <bool>(async(object parameter) => {
                var vm = (ApplicationVM)Application.Current.Resources["AppVM"];
                vm.ChangeTab(ApplicationTab.SEQUENCE);

                var deepSkyObjects = new List <DeepSkyObject>();
                foreach (var rect in CameraRectangles)
                {
                    var name     = rect.Id > 0 ? DSO?.Name + string.Format(" {0} ", Locale.Loc.Instance["LblPanel"]) + rect.Id : DSO?.Name;
                    var dso      = new DeepSkyObject(name, rect.Coordinates, profileService.ActiveProfile.ApplicationSettings.SkyAtlasImageRepository);
                    dso.Rotation = Rectangle.DisplayedRotation;
                    deepSkyObjects.Add(dso);
                }

                bool msgResult = false;
                if (parameter.ToString() == "Replace")
                {
                    msgResult = await vm.SeqVM.SetSequenceCoordiantes(deepSkyObjects);
                }
                else if (parameter.ToString() == "Add")
                {
                    msgResult = await vm.SeqVM.SetSequenceCoordiantes(deepSkyObjects, false);
                }

                ImageParameter = null;
                GC.Collect();
                GC.WaitForPendingFinalizers();
                return(msgResult);
            }, (object o) => Rectangle?.Coordinates != null);

            RecenterCommand = new AsyncCommand <bool>(async() => {
                DSO.Coordinates = Rectangle.Coordinates;
                await LoadImageCommand.ExecuteAsync(null);
                return(true);
            }, (object o) => Rectangle?.Coordinates != null);

            SlewToCoordinatesCommand = new AsyncCommand <bool>(async() => {
                return(await telescopeMediator.SlewToCoordinatesAsync(Rectangle.Coordinates));
            }, (object o) => Rectangle?.Coordinates != null);

            var appSettings = profileService.ActiveProfile.ApplicationSettings;

            appSettings.PropertyChanged += ApplicationSettings_PropertyChanged;

            profileService.ProfileChanged += (object sender, EventArgs e) => {
                appSettings.PropertyChanged -= ApplicationSettings_PropertyChanged;

                this.FocalLength     = profileService.ActiveProfile.TelescopeSettings.FocalLength;
                this.CameraPixelSize = profileService.ActiveProfile.CameraSettings.PixelSize;

                RaisePropertyChanged(nameof(CameraPixelSize));
                RaisePropertyChanged(nameof(FocalLength));
                RaisePropertyChanged(nameof(FieldOfView));
                RaisePropertyChanged(nameof(CameraWidth));
                RaisePropertyChanged(nameof(CameraHeight));
                appSettings = profileService.ActiveProfile.ApplicationSettings;
                appSettings.PropertyChanged += ApplicationSettings_PropertyChanged;
                ApplicationSettings_PropertyChanged(null, null);
            };

            resizeTimer          = new DispatcherTimer(DispatcherPriority.ApplicationIdle, _dispatcher);
            resizeTimer.Interval = TimeSpan.FromMilliseconds(500);
            resizeTimer.Tick    += ResizeTimer_Tick;

            ScrollViewerSizeChangedCommand = new RelayCommand((parameter) => {
                resizeTimer.Stop();
                if (ImageParameter != null && FramingAssistantSource == SkySurveySource.SKYATLAS)
                {
                    resizeTimer.Start();
                }
            });

            profileService.LocationChanged += (object sender, EventArgs e) => {
                DSO = new DeepSkyObject(DSO.Name, DSO.Coordinates, profileService.ActiveProfile.ApplicationSettings.SkyAtlasImageRepository);
            };

            InitializeCache();
        }
コード例 #47
0
 public AddEditProfilePageViewModel(INavigationService navigationService, IProfileService profileService) : base(navigationService)
 {
     _profileService = profileService;
     GalleryAction  += TakePhotoFromGallery;
     CameraAction   += TakePhotoWithCamera;
 }
コード例 #48
0
 public ProfilesController(IProfileService profileService)
 {
     _profileService = profileService;
 }
コード例 #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserInfoResponseGenerator"/> class.
 /// </summary>
 /// <param name="profile">The profile.</param>
 /// <param name="resourceStore">The resource store.</param>
 /// <param name="logger">The logger.</param>
 public UserInfoResponseGenerator(IProfileService profile, IResourceStore resourceStore, ILogger <UserInfoResponseGenerator> logger)
 {
     Profile   = profile;
     Resources = resourceStore;
     Logger    = logger;
 }
コード例 #50
0
ファイル: ProfileScanWorker.cs プロジェクト: 3grkt/ABO
 public ProfileScanWorker(IProfileService profileService, ILogger logger, IAppSettings appSettings)
 {
     this._profileService = profileService;
     this._logger         = logger;
     this._appSettings    = appSettings;
 }
コード例 #51
0
 public ProfileController(IProfileService profileService, IUserService userService)
 {
     this.userService    = userService;
     this.profileService = profileService;
 }
コード例 #52
0
 public ChangeProfileController(IAuthService authService, IProfileService profileService)
 {
     _authService    = authService;
     _profileService = profileService;
 }
コード例 #53
0
 public QualityProfileSchemaModule(IProfileService profileService)
     : base("/qualityprofile/schema")
 {
     _profileService   = profileService;
     GetResourceSingle = GetSchema;
 }
コード例 #54
0
ファイル: EventService.cs プロジェクト: Egor-kl/Life-Balance
 public EventService(IRepository <Event> eventRepository, IMapper mapper, IProfileService profileService)
 {
     _eventRepository = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository));
     _mapper          = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _profileService  = profileService ?? throw new ArgumentNullException(nameof(profileService));
 }
コード例 #55
0
 public CreditController(UserManager <ApplicationUser> userManager, ICreditService creditService, IProfileService profileService, ILogger <CreditController> logger)
 {
     _userManager    = userManager;
     _creditService  = creditService;
     _profileService = profileService;
     _logger         = logger;
 }
コード例 #56
0
 public ProfileController(IProfileService profileService, IMapper mapper)
 {
     _profileService = profileService;
     _mapper         = mapper;
 }
コード例 #57
0
        public static TokenRequestValidator CreateTokenRequestValidator(
            IdentityServerOptions options = null,
            IResourceStore resourceStore  = null,
            IAuthorizationCodeStore authorizationCodeStore         = null,
            IRefreshTokenStore refreshTokenStore                   = null,
            IResourceOwnerPasswordValidator resourceOwnerValidator = null,
            IProfileService profile = null,
            IDeviceCodeValidator deviceCodeValidator = null,
            IEnumerable <IExtensionGrantValidator> extensionGrantValidators = null,
            ICustomTokenRequestValidator customRequestValidator             = null,
            ITokenValidator tokenValidator           = null,
            IRefreshTokenService refreshTokenService = null,
            IResourceValidator resourceValidator     = null)
        {
            if (options == null)
            {
                options = TestIdentityServerOptions.Create();
            }

            if (resourceStore == null)
            {
                resourceStore = new InMemoryResourcesStore(TestScopes.GetIdentity(), TestScopes.GetApis(), TestScopes.GetScopes());
            }

            if (resourceOwnerValidator == null)
            {
                resourceOwnerValidator = new TestResourceOwnerPasswordValidator();
            }

            if (profile == null)
            {
                profile = new TestProfileService();
            }

            if (deviceCodeValidator == null)
            {
                deviceCodeValidator = new TestDeviceCodeValidator();
            }

            if (customRequestValidator == null)
            {
                customRequestValidator = new DefaultCustomTokenRequestValidator();
            }

            ExtensionGrantValidator aggregateExtensionGrantValidator;

            if (extensionGrantValidators == null)
            {
                aggregateExtensionGrantValidator = new ExtensionGrantValidator(new[] { new TestGrantValidator() }, TestLogger.Create <ExtensionGrantValidator>());
            }
            else
            {
                aggregateExtensionGrantValidator = new ExtensionGrantValidator(extensionGrantValidators, TestLogger.Create <ExtensionGrantValidator>());
            }

            if (authorizationCodeStore == null)
            {
                authorizationCodeStore = CreateAuthorizationCodeStore();
            }

            if (refreshTokenStore == null)
            {
                refreshTokenStore = CreateRefreshTokenStore();
            }

            if (resourceValidator == null)
            {
                resourceValidator = CreateResourceValidator(resourceStore);
            }

            if (tokenValidator == null)
            {
                tokenValidator = CreateTokenValidator(refreshTokenStore: refreshTokenStore, profile: profile);
            }

            if (refreshTokenService == null)
            {
                refreshTokenService = CreateRefreshTokenService(
                    refreshTokenStore,
                    profile);
            }

            return(new TokenRequestValidator(
                       options,
                       authorizationCodeStore,
                       resourceOwnerValidator,
                       profile,
                       deviceCodeValidator,
                       aggregateExtensionGrantValidator,
                       customRequestValidator,
                       resourceValidator,
                       resourceStore,
                       tokenValidator,
                       refreshTokenService,
                       new TestEventService(),
                       new StubClock(),
                       TestLogger.Create <TokenRequestValidator>()));
        }
コード例 #58
0
        private static IRefreshTokenService CreateRefreshTokenService(IRefreshTokenStore store, IProfileService profile)
        {
            var service = new DefaultRefreshTokenService(
                store,
                profile,
                new StubClock(),
                TestLogger.Create <DefaultRefreshTokenService>());

            return(service);
        }
コード例 #59
0
        public static AuthorizeRequestValidator CreateAuthorizeRequestValidator(
            IdentityServerOptions options = null,
            IResourceStore resourceStore  = null,
            IClientStore clients          = null,
            IProfileService profile       = null,
            ICustomAuthorizeRequestValidator customValidator = null,
            IRedirectUriValidator uriValidator               = null,
            IResourceValidator resourceValidator             = null,
            JwtRequestValidator jwtRequestValidator          = null,
            IJwtRequestUriHttpClient jwtRequestUriHttpClient = null)
        {
            if (options == null)
            {
                options = TestIdentityServerOptions.Create();
            }

            if (resourceStore == null)
            {
                resourceStore = new InMemoryResourcesStore(TestScopes.GetIdentity(), TestScopes.GetApis(), TestScopes.GetScopes());
            }

            if (clients == null)
            {
                clients = new InMemoryClientStore(TestClients.Get());
            }

            if (customValidator == null)
            {
                customValidator = new DefaultCustomAuthorizeRequestValidator();
            }

            if (uriValidator == null)
            {
                uriValidator = new StrictRedirectUriValidator();
            }

            if (resourceValidator == null)
            {
                resourceValidator = CreateResourceValidator(resourceStore);
            }

            if (jwtRequestValidator == null)
            {
                jwtRequestValidator = new JwtRequestValidator("https://identityserver", new LoggerFactory().CreateLogger <JwtRequestValidator>());
            }

            if (jwtRequestUriHttpClient == null)
            {
                jwtRequestUriHttpClient = new DefaultJwtRequestUriHttpClient(new HttpClient(new NetworkHandler(new Exception("no jwt request uri response configured"))), options, new LoggerFactory());
            }


            var userSession = new MockUserSession();

            return(new AuthorizeRequestValidator(
                       options,
                       clients,
                       customValidator,
                       uriValidator,
                       resourceValidator,
                       userSession,
                       jwtRequestValidator,
                       jwtRequestUriHttpClient,
                       TestLogger.Create <AuthorizeRequestValidator>()));
        }
コード例 #60
0
ファイル: HNSKY.cs プロジェクト: daleghent/NINA
 public HNSKY(IProfileService profileService)
 {
     this.address = profileService.ActiveProfile.PlanetariumSettings.HNSKYHost;
     this.port    = profileService.ActiveProfile.PlanetariumSettings.HNSKYPort;
 }