public UserConnectionService(
     IUserConnectionRepository userConnectionRepository,
     IUnitOfWork unitOfWork)
 {
     _userConnectionRepository = userConnectionRepository;
     _unitOfWork = unitOfWork;
 }
        public override void SetUp()
        {
            base.SetUp();

            _userReposiotry           = ServiceLocator.Current.GetInstance <IUserRepository>();
            _userConnectionService    = ServiceLocator.Current.GetInstance <IUserConnectionService>();
            _userConnectionRepository = ServiceLocator.Current.GetInstance <IUserConnectionRepository>();
            _unitOfWork = ServiceLocator.Current.GetInstance <IUnitOfWork>();
        }
Exemple #3
0
 public NotificationEventHandler(INotificationService notificationService,
                                 IUserConnectionRepository userConnectionRepository, IHubContext <NotificationHub> notificationHub,
                                 IResourceService <GhmNotificationResource> resourceService)
 {
     _notificationService      = notificationService;
     _userConnectionRepository = userConnectionRepository;
     _notificationHub          = notificationHub;
     _resourceService          = resourceService;
 }
Exemple #4
0
 public NotificationsController(INotificationService notificationService, IUserConnectionService userConnectionService,
                                IUserConnectionRepository userConnectionRepository, IResourceService <GhmNotificationResource> resourceService,
                                IHubContext <NotificationHub> notificationHub)
 {
     _notificationService      = notificationService;
     _userConnectionService    = userConnectionService;
     _userConnectionRepository = userConnectionRepository;
     _resourceService          = resourceService;
     _notificationHub          = notificationHub;
 }
Exemple #5
0
 public ConversationHub(
     IConversationRepository conversationRepository,
     IMessageRepository messageRepository,
     IUserConnectionRepository userConnectionRepository,
     UserManager <UserEntity> userManager
     )
 {
     this.userConnectionRepository = userConnectionRepository;
     this.userManager            = userManager;
     this.messageRepository      = messageRepository;
     this.conversationRepository = conversationRepository;
 }
 public UserConnectionService(IUserConnectionRepository userConnectionRepository,
                              IUnitOfWork unitOfWork)
     : base(userConnectionRepository, unitOfWork)
 {
 }
 public ProfileDomainService(IUserProfileRepository repository
                             , IUserConnectionRepository userConnectionRepository) : base(repository)
 {
     this.userConnectionRepository = userConnectionRepository;
 }
 public UserConnectionService(IUserConnectionRepository userConnectionRepository, IUserRepository userRepository)
 {
     _userConnectionRepository = userConnectionRepository;
     _userRepository           = userRepository;
 }
Exemple #9
0
        private static void CreateUsers()
        {
            IUserRepository           userRepository           = ServiceLocator.Current.GetInstance <IUserRepository>();
            IUserConnectionRepository userConnectionRepository = ServiceLocator.Current.GetInstance <IUserConnectionRepository>();
            IUnitOfWork unitOfWork = ServiceLocator.Current.GetInstance <IUnitOfWork>();

            var usertest1  = CreateValidUser("usertest1", "Martin", "Test1");
            var usertest2A = CreateValidUser("usertest2A", "Arnold", "Test2A");
            var usertest2B = CreateValidUser("usertest2B", "Victor", "Test2B");
            var usertest3  = CreateValidUser("usertest3", "Victor", "Test3");
            var usertest4  = CreateValidUser("usertest4", "Victor", "Test4");
            var usertest5  = CreateValidUser("usertest5", "Victor", "Test5");
            var usertest6  = CreateValidUser("usertest6", "Victor", "Test6");
            var usertest7  = CreateValidUser("usertest7", "Victor", "Test7");
            var usertest8  = CreateValidUser("usertest8", "Victor", "Test8");
            var usertest9  = CreateValidUser("usertest9", "Victor", "Test9");
            var unknown1   = CreateValidUser("unknown1", "Victor", "Unknown1");
            var unknown2   = CreateValidUser("unknown2", "Victor", "Unknown2");

            userRepository.Create(usertest1);
            userRepository.Create(usertest2A);
            userRepository.Create(usertest2B);
            userRepository.Create(usertest3);
            userRepository.Create(usertest4);
            userRepository.Create(usertest5);
            userRepository.Create(usertest6);
            userRepository.Create(usertest7);
            userRepository.Create(usertest8);
            userRepository.Create(usertest9);
            userRepository.Create(unknown1);
            userRepository.Create(unknown2);

            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest1, ToUser = usertest2A
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest2A, ToUser = usertest2B
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest2A, ToUser = usertest3
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest2B, ToUser = usertest2A
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest3, ToUser = usertest4
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest4, ToUser = usertest5
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest5, ToUser = usertest6
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest6, ToUser = usertest7
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest7, ToUser = usertest8
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = usertest8, ToUser = usertest9
            });
            userConnectionRepository.Create(new UserConnection {
                Id = Guid.NewGuid(), FromUser = unknown1, ToUser = unknown2
            });

            unitOfWork.Commit();
        }
Exemple #10
0
 public UserConnectionService(IUserConnectionRepository userConnectionRepository, IHubContext <NotificationHub> notificationHubContext)
 {
     _userConnectionRepository = userConnectionRepository;
     _notificationHubContext   = notificationHubContext;
 }