Пример #1
0
 public InvitationRepository(SoproplDbContext context, IOrganizationRepository orgRepo, INotificationRepository notificationRepo, ISmtpClientRepository smtpClientRepo)
 {
     this.orgRepo          = orgRepo;
     this.smtpClientRepo   = smtpClientRepo;
     this.notificationRepo = notificationRepo;
     this.context          = context;
 }
Пример #2
0
        public PhotoRepository(SoproplDbContext context, IOptions <CloudinarySettings> CloudinarySettings)
        {
            this.context            = context;
            this.CloudinarySettings = CloudinarySettings;

            Account account = new Account(
                this.CloudinarySettings.Value.CloudName,
                this.CloudinarySettings.Value.ApiKey,
                this.CloudinarySettings.Value.ApiSecret
                );

            this.cloudinary = new Cloudinary(account);
        }
Пример #3
0
        public void OnAuthorization(AuthorizationFilterContext context)
        {
            var r = this.Roles;
            var p = this.Policy;
            SoproplDbContext dbocntext = (SoproplDbContext)context.HttpContext.RequestServices.GetService(typeof(SoproplDbContext));

            Console.WriteLine();
            Console.WriteLine();
            var v    = context.HttpContext.User.FindFirst(ClaimTypes.Name);
            var user = dbocntext.Users.Find(v);

            Console.WriteLine(user.UserName);
            Console.WriteLine();
            Console.WriteLine();
            context.Result = new UnauthorizedResult();
        }
Пример #4
0
 public MemberRepository(SoproplDbContext context, ITeamRepository teamRepo)
 {
     this.teamRepo = teamRepo;
     this.context  = context;
 }
Пример #5
0
 public UserRepository(SoproplDbContext context)
 {
     this.context    = context;
     this.normalizer = new NameNormalizer();
 }
Пример #6
0
 public OrganizationRepository(SoproplDbContext context, IProjectRepository projectRepo)
 {
     this.projectRepo    = projectRepo;
     this.nameNormalizer = new NameNormalizer();
     this.context        = context;
 }
Пример #7
0
 public TeamRepository(SoproplDbContext context, IOrganizationRepository organizationRepo)
 {
     this.organizationRepo = organizationRepo;
     this.context          = context;
     this.normalizer       = new NameNormalizer();
 }
 public NotificationRepository(IHubContext <NotificationHub> hubContext, IMapper mapper, SoproplDbContext context)
 {
     this.context    = context;
     this.mapper     = mapper;
     this.hubContext = hubContext;
 }