public MessageListViewModel(int friendId , IMessageItemModelFactory messageItemModelFactory , IUserInfoRepository userInfoRepository , IFriendsRepository friendsRepository , IDialogMessagesRepository dialogMessagesRepository , ILoadingIndicatorViewModel loadingIndicatorModel , ILanguageRepository languageRepository , ILogger logger) : base(languageRepository, logger) { _messageItemModelFactory = messageItemModelFactory; FriendId = friendId; MessageViews = new BindableCollection<IMessageBaseItemViewModel>(); LoadingIndicatorModel = loadingIndicatorModel; if (userInfoRepository.NotEmpty()) { UserFirstName = userInfoRepository.Data.FirstName; } if (friendsRepository.NotEmpty()) { FriendFirstName = friendsRepository.Data.FirstOrDefault(x => x.VkId == friendId)?.FirstName; } dialogMessagesRepository.AddingRange += DialogMessagesAddingRange; dialogMessagesRepository.AddedRange += DialogMessagesAddedRange; dialogMessagesRepository.AddRangeFailed += DialogMessagesAddRangeFailed; }
public PostageAppService(IPostageRepository postageRepository, ILogged logged, IFriendsRepository friendsRepository) { _postageRepository = postageRepository; _logged = logged; _friendsRepository = friendsRepository; }
public FriendsService(IFriendsRepository repository, IUsersRepository usersRepository, IKeeszConnectIntegrationEventService eventBus) { _repository = repository; _usersRepository = usersRepository; _eventBus = eventBus; }
public FriendRequestManagerService() { _loggerService = DependencyService.Get <ILoggerService>(); _identityService = DependencyService.Get <IIdentityService>(); _friendRequestRepository = DependencyService.Get <IFriendRequestRepository>(); _friendsRepository = DependencyService.Get <IFriendsRepository>(); }
public FriendsRepositoryTests() { friends = new List <Friend> { new Friend("John", new Coordinate(100, 200)), new Friend("Eva", new Coordinate(300, 500)), new Friend("Adam", new Coordinate(400, 300)) }; Mock <IFriendsRepository> mockFriendRepository = new Mock <IFriendsRepository>(); mockFriendRepository.Setup(mr => mr.GetAll()).Returns(Task.FromResult(friends)); mockFriendRepository.Setup(mr => mr.GetById(It.IsAny <string>())).Returns((string id) => Task.FromResult(friends.Where(x => x._id == ObjectId.Parse(id)).FirstOrDefault())); mockFriendRepository.Setup(mr => mr.AddFriend(It.IsAny <Friend>())).Returns(async(Friend friend) => { await Task.Run(() => { var updatedList = friends.ToList(); updatedList.Add(friend); friends = updatedList; }); }); MockFriendsRepository = mockFriendRepository.Object; }
public NavigationViewModel(IFriendsRepository repository, IEventAggregator eventAggregator) { _repository = repository; Friends = _repository.GetFriends(); _eventAggregator = eventAggregator; _eventAggregator.GetEvent <UpdateFriendDetailViewEvent>().Subscribe(onUpdateDetailView); }
public FriendInfoViewModel(int friendId , ILanguageRepository languageRepository , IFriendsRepository friendsRepository , IFriendsAvatarsRepository friendsAvatarsRepository , ILogger logger) : base(languageRepository, logger) { FriendId = friendId; if (friendsRepository.NotEmpty()) { var friend = friendsRepository.Data.FirstOrDefault(x => x.VkId == friendId); if (friend != null) { FullName = friend.FullName; Online = friend.Online; } } if (friendsAvatarsRepository.NotEmpty()) { var content = friendsAvatarsRepository.Data.FirstOrDefault(x => x.FriendId == friendId)?.Content; Avatar = CreateBitmapImage(content); } }
public UserService(IDBContext context, IMapper mapper, IPasswordHasher passwordHasher, IFriendsRepository friendsRepository) { _friendsRepository = _friendsRepository; _context = context; _mapper = mapper; _passwordHasher = passwordHasher; _users = _context.Users.AsQueryable(); }
public DataManager(IUsersRepository usersRepository, IFriendsRepository friendsRepository, IFriendRequestsRepository friendRequestsRepository, IMessagesRepository messagesRepository, PrimaryMembershipProvider provider) { this.usersRepository = usersRepository; this.friendsRepository = friendsRepository; this.friendRequestsRepository = friendRequestsRepository; this.messagesRepository = messagesRepository; this.provider = provider; }
public SignalrRepository(MessengerDbContext context, IAuthRepository authRepository, IFriendsRepository friendsRepository) { _context = context; _authRepository = authRepository; _friendsRepository = friendsRepository; }
public UsersManageService() { _loggerService = DependencyService.Get <ILoggerService>(); _identityService = DependencyService.Get <IIdentityService>(); _userProfileRepository = DependencyService.Get <IUserProfileRepository>(); _friendRequestRepository = DependencyService.Get <IFriendRequestRepository>(); _friendsRepository = DependencyService.Get <IFriendsRepository>(); }
public SearchRepository(MessengerDbContext context, IFriendsRepository friendsRepository, IAccountDetailRepository detailRepository) { _context = context; _friendsRepository = friendsRepository; _accountDetailRepository = detailRepository; }
public UserController(IUserRepository _repository, IOptions <ApplicationSettings> _appSettings, IUtilitiesRepository _utilities, IFriendsRepository _friendsRepository, IFriendsRequestRepository _requestRepository) { this.repository = _repository; this.appSettings = _appSettings.Value; this.utilities = _utilities; this.friendsRepository = _friendsRepository; this.requestRepository = _requestRepository; }
public FriendsController( UserManager <ApplicationUser> userManager, IFriendsRepository friendsRepository, IUserTracker <Notification> userTracker) { _userManager = userManager; _friendsRepository = friendsRepository; _userTracker = userTracker; }
public FriendDetailViewModel(IEventAggregator eventAggregator, IFriendsRepository repository) { _repository = repository; _eventAggregator = eventAggregator; _eventAggregator.GetEvent <OpenFriendDetailViewEvent>().Subscribe(onOpenFriendDetailView); SaveCommand = new DelegateCommand(OnSaveExecute, OnSaveCanExecute); DeleteCommand = new DelegateCommand(OnDeleteExecute, OnCanDeleteExecute); InsertCommand = new DelegateCommand(OnInsertExecute, OnCanInsertExecute); }
public FriendsServices( IMapper mapper, IFriendsRepository friendsRepository, ICalculationHistoryLogRepository logRepository) { _mapper = mapper; _friendsRepository = friendsRepository; _logRepository = logRepository; }
public PhotosController(IFriendsRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig) { this.cloudinaryConfig = cloudinaryConfig; this.mapper = mapper; this.repo = repo; Account cloudAccount = new Account( cloudinaryConfig.Value.ClouldName, cloudinaryConfig.Value.ApiKey, cloudinaryConfig.Value.ApiSecret); cloudinary = new Cloudinary(cloudAccount); }
public UnitOfWork(AppDbContext dbContext) { _dbContext = dbContext; Users = new UsersRepository(dbContext); Chats = new ChatsRepository(dbContext); UsersChats = new UsersChatsRepository(dbContext); Messages = new MessagesRepository(dbContext); Files = new FilesRepository(dbContext); FriendShips = new FriendShipsRepository(dbContext); Friends = new FriendsRepository(dbContext); }
public PagesController(IAuthRepository authRepository, IMapper mapper, IAccountDetailRepository accountDetailRepository, IFriendsRepository friendsRepository, IChatRepository chatRepository) { _authRepository = authRepository; _mapper = mapper; _accountDetailRepository = accountDetailRepository; _friendsRepository = friendsRepository; _chatRepository = chatRepository; }
public AccountController(IMapper mapper, IAuthRepository authRepository, ISendEmail sendEmail, IAccountDetailRepository accountDetailRepository, IFriendsRepository friendsRepository) { _mapper = mapper; _authRepository = authRepository; _emailService = sendEmail; _accountDetailRepository = accountDetailRepository; _friendsRepository = friendsRepository; }
public AddFriendsAvatarsToRepository(ISessionInfoRepository sessionInfoRepository , IFriendsRepository friendsRepository , IFriendsAvatarsRepository friendsAvatarsRepository , IAddFriendAvatarFactory addFriendAvatarFactory , ISendFriendsAvatarsFactory sendAvatarsFactory) { _sessionInfoRepository = sessionInfoRepository; _friendsRepository = friendsRepository; _friendsAvatarsRepository = friendsAvatarsRepository; _addFriendAvatarFactory = addFriendAvatarFactory; _sendAvatarsFactory = sendAvatarsFactory; }
public CabinetController( UserManager <ApplicationUser> userManager, IPromiseRepository promiseRepository, IFriendsRepository friendsRepository, IMessagesRepository messagesRepository, IUserTracker <Notification> userTracker) { _promiseRepository = promiseRepository; _userManager = userManager; _messagesRepository = messagesRepository; _userTracker = userTracker; _friendsRepository = friendsRepository; }
public ServerManager(IUsersRepository usersRepository, IFriendsRepository friendsRepository, IMessagesRepository messagesRepository, IWordsRepository wordsRepository) { this.usersRepository = usersRepository; this.friendsRepository = friendsRepository; this.messagesRepository = messagesRepository; this.wordsRepository = wordsRepository; LoggedUsers = new ConcurrentDictionary <int, User>(); ActiveRooms = new ConcurrentDictionary <int, Room>(); ActiveGames = new ConcurrentDictionary <int, Game>(); }
public UserAppService(IGenderRepository genderRepository, IUserRepository userRepository, ILogged logged, IFriendsRepository friendsRepository, IPostageRepository postageRepository, ICommentRepository commentRepository, ILikesRepository likesRepository) { _genderRepository = genderRepository; _userRepository = userRepository; _logged = logged; _friendsRepository = friendsRepository; _postageRepository = postageRepository; _commentRepository = commentRepository; _likesRepository = likesRepository; }
public DataManager(IUserRepository usersRepository, IFriendsRepository friendsRepository, IFriendRequestsRepository friendRequestsRepository, IMessagesRepository messagesRepository, IPictureRepository pictureRepository, IMusicRepository musicRepository, IPostRepository postRepository, ICommentRepository commentReposiyory, PrimaryMembershipProvider provider) { this.usersRepository = usersRepository; this.friendsRepository = friendsRepository; this.friendRequestsRepository = friendRequestsRepository; this.messagesRepository = messagesRepository; this.pictureRepository = pictureRepository; this.musicRepository = musicRepository; this.provider = provider; }
public DataManager(IUserRepository usersRepository, IFriendsRepository friendsRepository, IFriendRequestsRepository friendRequestsRepository, IMessagesRepository messagesRepository, IPictureRepository pictureRepository,IMusicRepository musicRepository,IPostRepository postRepository, ICommentRepository commentReposiyory, PrimaryMembershipProvider provider) { this.usersRepository = usersRepository; this.friendsRepository = friendsRepository; this.friendRequestsRepository = friendRequestsRepository; this.messagesRepository = messagesRepository; this.pictureRepository = pictureRepository; this.musicRepository = musicRepository; this.provider = provider; }
public FriendsController(IAuthRepository authRepository, IMapper mapper, IAccountDetailRepository accountDetailRepository, IFriendsRepository friendsRepository, ISearchRepository searchRepository, ISendEmail sendEmail) { _authRepository = authRepository; _accountDetailRepository = accountDetailRepository; _mapper = mapper; _friendsRepository = friendsRepository; _searchRepository = searchRepository; _sendEmailRepository = sendEmail; }
public UnitOfWork( MainDbContext context, IFriendsRepository friendsRepository, IPhotoRepository photoRepository, IPostRepository postRepository, IUserRepository userRepository ) { _context = context; FriendsRepository = friendsRepository; PhotoRepository = photoRepository; PostRepository = postRepository; UserRepository = userRepository; }
public PhotosController(IFriendsRepository friendsRepository, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig, IFriendsRepository repo) { _repo = repo; _cloudinaryConfig = cloudinaryConfig; _mapper = mapper; Account acc = new Account( _cloudinaryConfig.Value.CloudName, _cloudinaryConfig.Value.ApiKey, _cloudinaryConfig.Value.ApiSecret ); _cloudinary = new Cloudinary(acc); }
public UsersManager(IUnitOfWork unitOfWork, IUsersRepository usersRepository, ITokensManager tokensManager, IFriendsRepository friendsRepository, IConnectionsRepository connectionsRepository, IOptions <AppSettings> appSettings) : base(unitOfWork) { this.usersRepository = usersRepository; this.tokensManager = tokensManager; this.friendsRepository = friendsRepository; this.connectionsRepository = connectionsRepository; this.appSettings = appSettings.Value; }
public AccountDetailController(IAuthRepository authRepository, IMapper mapper, IAccountDetailRepository accountDetailRepository, IFriendsRepository friendsRepository, ICloudinaryService cloudinaryService, IFileManager fileManager) { _authRepository = authRepository; _mapper = mapper; _accountDetailRepository = accountDetailRepository; _friendsRepository = friendsRepository; _cloudinaryService = cloudinaryService; _fileManager = fileManager; }
/// <summary> /// The friend constructor with a config parameter who checks which context is used. /// </summary> /// <param name="config"></param> public FriendLogic(IConfiguration config) { ContextReader contextReader = new ContextReader(config); switch (contextReader.Context) { case "MSSQL": _context = new FriendSQLContext(contextReader.ConnectionString); break; default: _context = new FriendMemoryContext(); break; } _repository = new FriendRepository(_context); }
public RunLongPollBackgroundService(LongPollBackgroundService longPollBackgroundService , IAddDialogMessagesFactory addDialogMessagesFactory , ISessionInfoRepository sessionInfoRepository , IFriendsRepository friendsRepository , IDialogMessagesRepository dialogMessagesRepository , ILogger logger) { _longPollBackgroundService = longPollBackgroundService; _addDialogMessagesFactory = addDialogMessagesFactory; _sessionInfoRepository = sessionInfoRepository; _friendsRepository = friendsRepository; _dialogMessagesRepository = dialogMessagesRepository; _longPollBackgroundService.Complete += OnComplete; _longPollBackgroundService.Error += (sender, args) => { logger.Error(args.Exception); }; }
public FriendListViewModel(bool displayOnlineStatuses , IFriendsRepository friendsRepository , IFriendsAvatarsRepository friendsAvatarsRepository , IFriendItemModelFactory friendItemViewModelFactory , ILoadingIndicatorViewModel loadingIndicatorViewModel , ILanguageRepository languageRepository , ILogger logger) : base(languageRepository, logger) { _friendItemViewModelFactory = friendItemViewModelFactory; _friendsAvatarsRepository = friendsAvatarsRepository; _displayOnlineStatuses = displayOnlineStatuses; FriendViews = new BindableCollection<IFriendItemViewModel>(); LoadingIndicatorModel = loadingIndicatorViewModel; friendsAvatarsRepository.Adding += FriendsAvatarsRepositoryAdding; friendsAvatarsRepository.Added += FriendsAvatarsRepositoryAdded; friendsAvatarsRepository.AddFailed += FriendsAvatarsRepositoryAddFailed; BindLoadingIndicatorToCollectionRepository<IFriendsRepository, IFriend>(loadingIndicatorViewModel, friendsRepository); }
public FriendsViewModel(IFriendsRepository friendsRepository , IFriendListModelFactory friendListModelFactory , ILanguageRepository languageRepository , ILogger logger) : base(languageRepository, logger) { _friendsRepository = friendsRepository; OnlineFriendsModel = friendListModelFactory.CreateFriendListViewModel(displayOnlineStatuses: false); AllFriendsModel = friendListModelFactory.CreateFriendListViewModel(displayOnlineStatuses: true); friendsRepository.Loaded += FriendsRepositoryLoaded; friendsRepository.OnlineStatusChanged += FriendsRepositoryOnlineStatusChanged; }
public FriendsController(IFriendsRepository repository) { Repository = repository; }
public FriendsAppService(IUserRepository userRepository, IFriendsRepository friendsRepository, ILogged logged) { _userRepository = userRepository; _friendsRepository = friendsRepository; _logged = logged; }
public FriendsService(IFriendsRepository friendsRepository) { _friendsRepository = friendsRepository; }
// // GET: /Friends/ public FriendsController(IFriendsRepository friendsRepository) { this.friendsRepository = friendsRepository; }
public PasswortResetController(IFriendsRepository repository) { Repository = repository; }