Ejemplo n.º 1
0
 public JoinController(ILogger <JoinController> logger,
                       ServiceFacade.Controller context,
                       AuthenticationService authenticationService,
                       AuthorizationCodeService authorizationCodeService,
                       MailService mailService,
                       PointTranslationService pointTranslationService,
                       SchoolService schoolService,
                       SiteService siteService,
                       QuestionnaireService questionnaireService,
                       UserService userService)
     : base(context)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _mapper = context.Mapper;
     _authenticationService = authenticationService
                              ?? throw new ArgumentNullException(nameof(authenticationService));
     _authorizationCodeService = authorizationCodeService
                                 ?? throw new ArgumentNullException(nameof(authorizationCodeService));
     _mailService             = mailService ?? throw new ArgumentNullException(nameof(mailService));
     _pointTranslationService = pointTranslationService
                                ?? throw new ArgumentNullException(nameof(pointTranslationService));
     _schoolService = schoolService
                      ?? throw new ArgumentNullException(nameof(schoolService));
     _siteService          = siteService ?? throw new ArgumentNullException(nameof(siteService));
     _questionnaireService = questionnaireService
                             ?? throw new ArgumentNullException(nameof(questionnaireService));
     _userService = userService ?? throw new ArgumentNullException(nameof(userService));
     PageTitle    = _sharedLocalizer[Annotations.Title.Join];
 }
 public RolesController(ILogger <RolesController> logger,
                        ServiceFacade.Controller context,
                        AuthorizationCodeService authorizationCodeService,
                        RoleService roleService)
     : base(context)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _authorizationCodeService = authorizationCodeService
                                 ?? throw new ArgumentNullException(nameof(authorizationCodeService));
     _roleService = roleService ?? throw new ArgumentNullException(nameof(roleService));
 }
Ejemplo n.º 3
0
        protected override void Load(ContainerBuilder builder)
        {
            //not sure if this is a proper/the best way
            var token = new AuthorizationCodeService(this.clientId, this.secretId).GetToken().access_token;

            builder.RegisterType <AuthorizationCodeService>().As <IAuthorizationCodeService>()
            .WithParameters(new List <Parameter> {
                new NamedParameter("clientId", this.clientId), new NamedParameter("clientSecretId", this.secretId)
            });
            builder.RegisterType <RequestHelper>().As <IRequestHelper>()
            .WithParameters(new List <Parameter> {
                new NamedParameter("token", token)
            });
            builder.RegisterType <PlaylistService>().As <IPlaylistService>();
            builder.RegisterType <AudioAnalysisService>().As <IAudioAnalysisService>();
            builder.RegisterType <RecommendationsService>().As <IRecommendationsService>();
            builder.RegisterType <TrackService>().As <ITrackService>();
            builder.RegisterType <ArtistService>().As <IArtistService>();
        }