Exemplo n.º 1
0
 public ChatService(IUnitOfWork _db, ChatContext _context, UserManager <User> _userManager, IBlackListService _blackListService, IHostingEnvironment appEnvironment, IFileManager _fileManager)
 {
     db               = _db;
     context          = _context;
     userManager      = _userManager;
     blackListService = _blackListService;
     fileManager      = _fileManager;
 }
Exemplo n.º 2
0
 public ContactController(UserManager <User> _userManager, IChatService _chatService, IMapper _mapper, IContactService _contactService, IBlackListService _blackListService)
 {
     userManager      = _userManager;
     mapper           = _mapper;
     contactService   = _contactService;
     blackListService = _blackListService;
     chatService      = _chatService;
 }
Exemplo n.º 3
0
 public BlackListingMiddleware(RequestDelegate next
                               , IBlackListService blackListService
                               , ISerializer serializer)
 {
     _next             = next ?? throw new ArgumentNullException(nameof(next));
     _blackListService = blackListService ?? throw new ArgumentNullException(nameof(blackListService));
     _serializer       = serializer ?? throw new ArgumentNullException(nameof(serializer));
 }
Exemplo n.º 4
0
 public ChatController(UserManager <User> _userManager, IMapper _mapper, IContactService _contactService, IBlackListService _blackListService, IChatService _chatService, IHubContext <ChatHub> _hubContext, IChatHub _chatHub)
 {
     userManager      = _userManager;
     mapper           = _mapper;
     contactService   = _contactService;
     blackListService = _blackListService;
     chatService      = _chatService;
     hubContext       = _hubContext;
     chatHub          = _chatHub;
 }
Exemplo n.º 5
0
 public UserController(UserManager <User> _userManager, IUserService _userService, IChatService _chatService, IMapper _mapper, IFileManager _fileManager, IContactService _contactService, IBlackListService _blackListService)
 {
     userManager      = _userManager;
     userService      = _userService;
     chatService      = _chatService;
     mapper           = _mapper;
     fileManager      = _fileManager;
     contactService   = _contactService;
     blackListService = _blackListService;
 }
Exemplo n.º 6
0
 public NotificationController(Core.IWorkContext workContext, IRateSrevice _rateRepository,
                               INotificationService _notificationsService,
                               IBlackListService _blackListService, IPostService _postService, ICustomerService _customerContext)
 {
     this._workContext          = workContext;
     this._notificationsService = _notificationsService;
     this._rateRepository       = _rateRepository;
     this._customerContext      = _customerContext;
     this._postService          = _postService;
     this._blackListService     = _blackListService;
 }
Exemplo n.º 7
0
 public FollowController(Core.IWorkContext workContext,
                         IRateSrevice _rateRepository, ICategoryService _categoryRepository, IFollowService _followRepository,
                         IBlackListService _blackListService, IPostService _postService, ICustomerService _customerContext)
 {
     this._workContext        = workContext;
     this._categoryRepository = _categoryRepository;
     this._rateRepository     = _rateRepository;
     this._customerContext    = _customerContext;
     this._postService        = _postService;
     this._followRepository   = _followRepository;
     this._blackListService   = _blackListService;
 }
Exemplo n.º 8
0
        public PaymentController(Core.IWorkContext workContext, IRateSrevice _rateRepository, ISettingService settingService,
                                 IPaymentService _paymentService,
                                 IBlackListService _blackListService, IPostService _postService, ICustomerService _customerContext)
        {
            settingService         = settingService;
            this._paymentService   = _paymentService;
            this._workContext      = workContext;
            this._rateRepository   = _rateRepository;
            this._customerContext  = _customerContext;
            this._postService      = _postService;
            this._blackListService = _blackListService;

            Settings = settingService.GetSettings();
        }
Exemplo n.º 9
0
        // :/
        public ConversationService(IRepository <Conversation> conversationRepository, IRepository <ConversationUser> conversationUserRepository,
                                   IRepository <ChatAction> chatActionRepository, IBlackListService blackListService, IMessageService messageService, ITimeProvider timeProvider, Mapper mapper)
        {
            _conversationRepository     = conversationRepository;
            _chatActionRepository       = chatActionRepository;
            _timeProvider               = timeProvider;
            _messageService             = messageService;
            _conversationUserRepository = conversationUserRepository;
            _blackListService           = blackListService;
            _mapper = mapper;

            // null obj pattern
            InitEmptyEventHandlers();
        }
Exemplo n.º 10
0
 public MessageService(IRepository <Message> messageRepository, IRepository <Attachment> attachmentRepository, ITimeProvider timeProvider,
                       IAttachmentContentProvider attachmentContentProvider, IBlackListService blackListService, IConversationUserService conversationUserService,
                       Mapper mapper)
 {
     _messageRepository         = messageRepository;
     _attachmentRepository      = attachmentRepository;
     _timeProvider              = timeProvider;
     _attachmentContentProvider = attachmentContentProvider;
     _blackListService          = blackListService;
     _conversationUserService   = conversationUserService;
     _mapper = mapper;
     // null obj pattern again
     InitEmptyEventHandlers();
 }
Exemplo n.º 11
0
 public UserController(Core.IWorkContext workContext, IRateSrevice _rateRepository, IFollowService _followRepository, IPaymentService _paymentRepository,
                       IBlackListService _blackListService, ICustomerServicesService _customerServiceContext, IPostService _postService, ICustomerService _customerContext, ISettingService _settingRepository, INotificationService _notificationService)
 {
     this._notificationService    = _notificationService;
     this._paymentRepository      = _paymentRepository;
     this._settingRepository      = _settingRepository;
     this._followRepository       = _followRepository;
     this._workContext            = workContext;
     this._rateRepository         = _rateRepository;
     this._customerContext        = _customerContext;
     this._postService            = _postService;
     this._blackListService       = _blackListService;
     this._customerServiceContext = _customerServiceContext;
     Settings     = _settingRepository.GetSettings();
     PagingParams = new PagingParams();
 }
 public ValidationService(IBlockchainApiClientProvider blockchainApiClientProvider,
                          IAssetsServiceWithCache assetsService,
                          IBlockchainSettingsProvider blockchainSettingsProvider,
                          IBlockchainWalletsClient blockchainWalletsClient,
                          IBlackListService blackListService,
                          AddressExtensionService addressExtensionService,
                          IBlockchainWalletsCacheService blockchainWalletsCacheService)
 {
     _blockchainApiClientProvider = blockchainApiClientProvider;
     _assetsService = assetsService;
     _blockchainSettingsProvider    = blockchainSettingsProvider;
     _blackListService              = blackListService;
     _blockchainWalletsClient       = blockchainWalletsClient;
     _addressExtensionService       = addressExtensionService;
     _blockchainWalletsCacheService = blockchainWalletsCacheService;
 }
Exemplo n.º 13
0
        private void context_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication application = sender as HttpApplication;
            HttpRequest     request     = application.Request;
            HttpResponse    response    = application.Response;

            string IP = GetIP(request);

            if (!string.IsNullOrEmpty(IP))
            {
                IBlackListService service = DataContext.ResolveService <IBlackListService>();
                int count = service.GetCount(" and Status = 1 and TypeName = 'IP' and TypeValue = @TypeValue ", new { TypeValue = IP });
                if (count > 0)
                {
                    response.ContentEncoding = Encoding.UTF8;
                    response.ContentType     = "text/html";
                    response.Write("抱歉!暂时无法访问,请稍候再试。");
                    application.CompleteRequest();
                }
            }
        }
Exemplo n.º 14
0
 public BlackListServiceWEB(IBlackListService _service)
 {
     this.service = _service;
 }
Exemplo n.º 15
0
 public BlackListController(IBlackListService blackListService, Core.IWorkContext workContext, IEventPublisher env)
 {
     this._blackListService = blackListService;
     this._workContext      = workContext;
     this._env = env;
 }
 public BlackListController(IBlackListService blackListService)
 {
     _blackListService = blackListService;
 }