Exemplo n.º 1
0
        public ProfilePresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            _account = _userSession.CurrentUser;

            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
            {
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_webContext.AccountID);
            }
            else
            {
                _accountBeingViewed = _userSession.CurrentUser;
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            }
            if (_accountBeingViewed == null)
                _redirector.GoToAccountLoginPage();
            if (_accountBeingViewed.Profile != null && _accountBeingViewed.Profile.ProfileID > 0)
                _privacyFlags = PrivacyFlag.GetPrivacyFlagsByProfileID(_accountBeingViewed.Profile.ProfileID);
            else
                _redirector.GoToHomePage();

        }
Exemplo n.º 2
0
 public BatchPhonesSearchNodeRequestHandler(NodeRequest request, NodeConnection current, ILoadUsersService loadUsersService, IPrivacyService privacyService)
 {
     this.request          = (BatchPhonesSearchNodeRequest)request;
     this.current          = current;
     this.loadUsersService = loadUsersService;
     this.privacyService   = privacyService;
 }
        public PrivaciesServiceTests()
        {
            this.InitializeMapper();
            this.InitializeDatabaseAndRepositories();
            this.InitializeFields();

            this.privacyService = new PrivacyService(this.privaciesRepository);
        }
Exemplo n.º 4
0
 public HomeController(
     IPrivacyService privacyService,
     IArticlesService articlesService,
     IRecipesService recipesService)
 {
     this.privacyService  = privacyService;
     this.articlesService = articlesService;
     this.recipesService  = recipesService;
 }
Exemplo n.º 5
0
        public PrivacyServiceTests()
        {
            TestsData testsData = TestsData.Create(nameof(PrivacyServiceTests));

            fillTestDbHelper            = testsData.FillTestDbHelper;
            AppServiceProvider.Instance = testsData.AppServiceProvider;
            gropsService    = testsData.AppServiceProvider.GroupsService;
            contactsService = testsData.AppServiceProvider.ContactsService;
            privacyService  = testsData.AppServiceProvider.PrivacyService;
        }
 public GetUsersRequestHandler(
     Request request, ClientConnection clientConnection, IConnectionsService connectionsService,
     ILoadUsersService loadUsersService, IPrivacyService privacyService, INodeRequestSender nodeRequestSender)
 {
     this.request            = (GetUsersRequest)request;
     this.clientConnection   = clientConnection;
     this.connectionsService = connectionsService;
     this.loadUsersService   = loadUsersService;
     this.privacyService     = privacyService;
     this.nodeRequestSender  = nodeRequestSender;
 }
Exemplo n.º 7
0
 public HomePresenter()
 {
     _userSession         = new UserSession();
     _accountService      = new AccountService();
     _redirector          = new Redirector();
     _profileService      = new ProfileService();
     _privacyService      = new PrivacyService();
     _friendService       = new FriendService();
     _StatusUpdateService = new StatusUpdateService();
     _webContext          = new WebContext();
 }
 public ConversationsNoticeService(IAppServiceProvider appServiceProvider)
 {
     this.connectionsService       = appServiceProvider.ConnectionsService;
     this.nodeNoticeService        = appServiceProvider.NodeNoticeService;
     this.pushNotificationsService = appServiceProvider.PushNotificationsService;
     this.loadChatsService         = appServiceProvider.LoadChatsService;
     this.loadChannelsService      = appServiceProvider.LoadChannelsService;
     this.loadDialogsService       = appServiceProvider.LoadDialogsService;
     this.pendingMessagesService   = appServiceProvider.PendingMessagesService;
     this.loadUsersService         = appServiceProvider.LoadUsersService;
     this.privacyService           = appServiceProvider.PrivacyService;
 }
Exemplo n.º 9
0
 public UserProfilePresenter()
 {
     _alertService = new AlertService();
     _profileService = new ProfileService();
     _userSession = new UserSession();
     _webContext = new WebContext();
     _accountService = new AccountService();
     _redirector = new Redirector();
     _privacyService = new PrivacyService();
     _friendService = new FriendService();
     _StatusUpdateService = new StatusUpdateService();
 }
Exemplo n.º 10
0
        public DefaultPresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
            else
                _accountBeingViewed = _userSession.CurrentUser;
        }
Exemplo n.º 11
0
 public GetObjectsInfoNodeRequestHandler(NodeRequest request,
                                         NodeConnection nodeConnection,
                                         ILoadChatsService loadChatsService,
                                         ILoadUsersService loadUsersService,
                                         ILoadChannelsService loadChannelsService,
                                         IPrivacyService privacyService,
                                         IFilesService filesService)
 {
     this.request             = (GetObjectsInfoNodeRequest)request;
     this.nodeConnection      = nodeConnection;
     this.loadChatsService    = loadChatsService;
     this.loadUsersService    = loadUsersService;
     this.loadChannelsService = loadChannelsService;
     this.privacyService      = privacyService;
     this.filesService        = filesService;
 }
Exemplo n.º 12
0
 public PrivacyPolicyController(
     ISecurityService securityService,
     ISubjectRepository subjectRepository,
     IResourceRepository resourceRepository,
     IConditionalExpressionService conditionalExpressionService,
     IPrivacyPolicyRepository privacyPolicyRepository,
     IPrivacyService privacyService,
     IPrivacyDomainRepository privacyDomainRepository)
 {
     _securityService              = securityService;
     _subjectRepository            = subjectRepository;
     _resourceRepository           = resourceRepository;
     _conditionalExpressionService = conditionalExpressionService;
     _privacyPolicyRepository      = privacyPolicyRepository;
     _privacyService          = privacyService;
     _privacyDomainRepository = privacyDomainRepository;
 }
Exemplo n.º 13
0
        public ViewProfilePresenter()
        {
            _levelOfExperienceRepository = new LevelOfExperienceRepository();
            _profileAttributeRepository  = new ProfileAttributeRepository();
            _profileRepository           = new ProfileRepository();
            _userSession             = new UserSession();
            _profileService          = new ProfileService();
            _profileAttributeService = new ProfileAttributeService();
            _redirector = new Redirector();
            _listProfileAttributeType = new List <ProfileAttributeType>();
            _listPrivacyFlags         = new List <PrivacyFlag>();
            _privacyService           = new PrivacyService();
            _listVisibilityLevel      = new List <VisibilityLevel>();
            profile            = new Profile();
            _accountRepository = new AccountRepository();

            _webContext = new WebContext();
        }
Exemplo n.º 14
0
        public ViewProfilePresenter()
        {
            _levelOfExperienceRepository = new LevelOfExperienceRepository();
            _profileAttributeRepository = new ProfileAttributeRepository();
            _profileRepository = new ProfileRepository();
            _userSession = new UserSession();
            _profileService = new ProfileService();
            _profileAttributeService = new ProfileAttributeService();
            _redirector = new Redirector();
            _listProfileAttributeType = new List<ProfileAttributeType>();
            _listPrivacyFlags = new List<PrivacyFlag>();
            _privacyService = new PrivacyService();
            _listVisibilityLevel = new List<VisibilityLevel>();
            profile = new Profile();
            _accountRepository = new AccountRepository();

            _webContext = new WebContext();
        }
 public HomeController(IMoviesService moviesService, IPrivacyService privacyService)
 {
     this.moviesService  = moviesService;
     this.privacyService = privacyService;
 }
 public SecurityService(IAccessControlService accessControlService, IPrivacyService privacyService)
 {
     _accessControlService = accessControlService;
     _privacyService       = privacyService;
 }
Exemplo n.º 17
0
 public StatusUpdateService()
 {
     _statusRepository = new StatusUpdateRepository();
     _alertService = new AlertService();
     _privacyService = new PrivacyService();
 }
 public PrivacyModel(ILogger <PrivacyModel> logger, IPrivacyService privacyService)
 {
     _logger         = logger;
     _privacyService = privacyService;
 }
 public PrivacyController(IPrivacyService privacyService)
 {
     this.privacyService = privacyService;
 }
Exemplo n.º 20
0
 public HomeController(IProductsService productsService, IPrivacyService privacyService)
 {
     this.productsService = productsService;
     this.privacyService  = privacyService;
 }
 public PrivacyApiController(IPrivacyService PrivacyService)
 {
     _PrivacyService = PrivacyService;
 }
 public GetUsersInfoNodeRequestHandler(Request request, ILoadUsersService loadUsersService, IPrivacyService privacyService)
 {
     this.request          = (GetUsersInformationNodeRequest)request;
     this.loadUsersService = loadUsersService;
     this.privacyService   = privacyService;
 }
Exemplo n.º 23
0
 public StatusUpdateService()
 {
     _statusRepository = new StatusUpdateRepository();
     _alertService     = new AlertService();
     _privacyService   = new PrivacyService();
 }