Beispiel #1
0
 public void TearDown()
 {
     _emailFactory       = null;
     _phoneNumberFactory = null;
     _userFactory        = null;
     _userLoginFactory   = null;
 }
Beispiel #2
0
 public void SetUp()
 {
     _emailFactory       = _mocks.StrictMock <IEmailFactory>();
     _phoneNumberFactory = _mocks.StrictMock <IPhoneNumberFactory>();
     _userLoginFactory   = _mocks.StrictMock <IUserLoginFactory>();
     _userFactory        = new UserFactory <User>(_phoneNumberFactory, _userLoginFactory);
 }
Beispiel #3
0
 public UserRepository(IPersistenceLayer persistenceLayer, IUserFactory <UserType> userFactory,
                       IAddressRepository addressRepository)
     : base(persistenceLayer)
 {
     _userFactory       = userFactory;
     _addressRepository = addressRepository;
 }
Beispiel #4
0
 public IdentityController(IHttpContextAccessor httpContextAccessor, BlogUserManager userManager, BlogRoleManager roleManager, IUserFactory userFactory)
 {
     _httpContextAccessor = httpContextAccessor;
     _userManager         = userManager;
     _roleManager         = roleManager;
     _userFactory         = userFactory;
 }
Beispiel #5
0
 public void Initialize()
 {
     _factory  = new UserFactory();
     _login    = "******";
     _password = "******";
     _balance  = 1000.0M;
 }
Beispiel #6
0
        /// <summary>
        /// 创建一个用于命令模型的服务容器。
        /// </summary>
        /// <param name="userFactory">用户工厂。</param>
        /// <param name="mockFactoryCallback">模拟的执行器工厂回调函数。</param>
        /// <param name="redisProvider">Redis 提供程序。若为 null 值表示启用基于应用程序域各种提供程序的服务容器。</param>
        /// <returns>返回一个服务容器。</returns>
        public static IIocContainer CreateContainer(IUserFactory userFactory
                                                    , Action <CommandModel.MockExecutorFactory> mockFactoryCallback = null
                                                    , IRedisProvider redisProvider = null)
        {
            if (userFactory == null)
            {
                throw new ArgumentNullException("userFactory");
            }

            var container = new IocContainer();

            container.AddService <IUserFactory>(userFactory);
            if (redisProvider != null)
            {
                container.AddService <IRedisProvider>(redisProvider);
            }

            if (mockFactoryCallback != null)
            {
                var executorFactory = new Aoite.CommandModel.MockExecutorFactory(container);
                mockFactoryCallback(executorFactory);
                container.AddService <CommandModel.IExecutorFactory>(executorFactory);
            }
            if (Db.Engine == null)
            {
                Lazy <IDbEngine> lazyEngine = new Lazy <IDbEngine>(() => new Aoite.Data.MsSqlEngine(""));
                container.AddService <IDbEngine>(lmps => Db.Engine == null ? lazyEngine.Value : Db.Context);
            }
            return(container);
        }
 public UserApplicationService(UnitOfWork uow, IUserFactory userFactory, IUserRepository userRepository, UserService userService)
 {
     this.uow            = uow;
     this.userFactory    = userFactory;
     this.userRepository = userRepository;
     this.userService    = userService;
 }
 /// <summary>
 /// </summary>
 /// <param name="httpContextAccessor"></param>
 /// <param name="userFactory"></param>
 public ExternalUserService(
     IHttpContextAccessor httpContextAccessor,
     IUserFactory userFactory)
 {
     this._httpContextAccessor = httpContextAccessor;
     this._userFactory         = userFactory;
 }
        public UserStream(
            IStreamResultGenerator streamResultGenerator,
            ITweetFactory tweetFactory,
            IMessageFactory messageFactory,
            IUserFactory userFactory,
            ITweetListFactory tweetListFactory,
            IJObjectStaticWrapper jObjectWrapper,
            IJsonObjectConverter jsonObjectConverter,
            IExceptionHandler exceptionHandler,
            ITwitterRequestGenerator twitterRequestGenerator,
            IStreamTrackManager <ITweet> streamTrackManager,
            ISynchronousInvoker synchronousInvoker,
            ITaskFactory taskFactory)
            : base(streamTrackManager, jsonObjectConverter, jObjectWrapper, streamResultGenerator, tweetFactory, twitterRequestGenerator, synchronousInvoker)
        {
            _messageFactory   = messageFactory;
            _userFactory      = userFactory;
            _tweetListFactory = tweetListFactory;
            _jObjectWrapper   = jObjectWrapper;
            _exceptionHandler = exceptionHandler;
            _taskFactory      = taskFactory;

            _events = new Dictionary <string, Action <JObject> >();

            InitializeEvents();
        }
        public RegisterStoreViewModel(IValidatableObjectFactory validatableObjectFactory, IUserDataStore userDataStore, IStoreDataStore storeDataStore,
                                      IStoreFactory storeFactory, IUserFactory userFactory,
                                      IRegisterCardViewModel cardViewModel, IStoreRegistrationEntry storeRegistrationEntry)
        {
            _validatableObjectFactory = validatableObjectFactory;
            _UserDataStore            = userDataStore;
            _StoreDataStore           = storeDataStore;
            _StoreFactory             = storeFactory;
            _UserFactory           = userFactory;
            CardViewModel          = cardViewModel;
            StoreRegistrationEntry = storeRegistrationEntry;

            StoreName      = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Store 1");
            CardNumber     = _validatableObjectFactory.CreateSimpleValidatebleObject <string>();
            Longitude      = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("1");
            Latitude       = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("2");
            StoreOwnerName = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Owner 1");
            Description    = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Description");
            Category       = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Category");

            StoreNameValidationCommand      = new Command(() => StoreName.Validate());
            LongitudeValidationCommand      = new Command(() => Longitude.Validate());
            LatitudeValidationCommand       = new Command(() => Latitude.Validate());
            StoreOwnerNameValidationCommand = new Command(() => StoreOwnerName.Validate());
            MoreInfoCommand      = new Command <CommandEventData>((commandData) => MoreInfoPopup(commandData));
            RegisterStoreCommand =
                new Command <CommandEventData>(async(data) => await NavigateToInventoryProductItem(data));
            DescriptionValidationCommand = new Command(() => Description.Validate());
            GetLogoPhotoCommand          = new Command(async() => ProductImageSource = await Utils.PickPhoto());
            TakeLogoPhotoCommand         = new Command(() => { });
            GetLocationCommand           = new Command(async() => await GetLocation());
            TypeOfCardChangedCommand     = new Command <CommandEventData>((data) => TypeOfCardSelectionChangedHandler(data));

            Init();
        }
Beispiel #11
0
        public void inputValidationCheck()
        {
            if (Regex.IsMatch(emailBox.Text, @"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"))
            {
                user = new UserFactory();
                User newUser = user.CreateUser("name", 1, UserType.Standard, emailBox.Text);

                if (emailBox.Text != null)
                {
                    if (userSelectBox.SelectedIndex == 1)
                    {
                        this.NavigationService.Navigate(new joinSessionFrame(newUser));
                    }
                    else if (userSelectBox.SelectedIndex == 0)
                    {
                        this.NavigationService.Navigate(new tutorPage(newUser));
                    }
                    else
                    {
                        MessageBox.Show("You must select a user type!");
                    }
                }
            }
            else
            {
                MessageBox.Show("You Must Enter a vaild Email!");
            }
        }
Beispiel #12
0
        public async Task <IActionResult> GetByEmailAddress(string emailAddress)
        {
            IActionResult result = null;

            using (ILifetimeScope scope = _container.BeginLifetimeScope())
            {
                SettingsFactory     settingsFactory = scope.Resolve <SettingsFactory>();
                CoreSettings        settings        = settingsFactory.CreateAccount(_settings.Value);
                IUserFactory        userFactory     = scope.Resolve <IUserFactory>();
                IEnumerable <IUser> users           = await userFactory.GetByEmailAddress(settings, emailAddress);

                IAccountFactory accountFactory = scope.Resolve <IAccountFactory>();
                ConcurrentBag <Task <IEnumerable <IAccount> > > accounts = new ConcurrentBag <Task <IEnumerable <IAccount> > >();
                users.AsParallel().ForAll(user => accounts.Add(accountFactory.GetByUserId(settings, user.UserId)));
                IMapper mapper = MapperConfigurationFactory.CreateMapper();
                result = Ok(
                    (await Task.WhenAll <IEnumerable <IAccount> >(accounts))
                    .SelectMany(results => results)
                    .Where(a => UserCanAccessAccount(a.AccountId))
                    .Select <IAccount, Account>(innerAccount => mapper.Map <Account>(innerAccount))
                    .ToList()
                    );
            }
            return(result);
        }
Beispiel #13
0
 public BlogController(ILogger <BlogController> logger, IPostService postService, IPageService pageService, ICategoryService categoryService, ITagsService tagsService, ICommentService commentService, IPostFactory postFactory, IPageFactory pageFactory, ICategoryFactory categoryFactory, ITagsFactory tagsFactory, BlogUserManager blogUserManager, IUserFactory userFactory, CommentsSettings commentsSettings, ICaptchaService captchaService, IHttpContextAccessor httpContextAccessor, IIPAddressService iPAddressService, IEmailSender emailSender, IJsonSerializer jsonSerializer, IStringLocalizer <BlogController> stringLocalizer, ISpamService spamService, IEventBus eventBus, BasicSettings basicSettings, IDistributedCache distributedCache)
 {
     _logger              = logger;
     _postService         = postService;
     _pageService         = pageService;
     _categoryService     = categoryService;
     _tagsService         = tagsService;
     _commentService      = commentService;
     _postFactory         = postFactory;
     _pageFactory         = pageFactory;
     _categoryFactory     = categoryFactory;
     _tagsFactory         = tagsFactory;
     _blogUserManager     = blogUserManager;
     _userFactory         = userFactory;
     _commentsSettings    = commentsSettings;
     _captchaService      = captchaService;
     _httpContextAccessor = httpContextAccessor;
     _iPAddressService    = iPAddressService;
     _emailSender         = emailSender;
     _jsonSerializer      = jsonSerializer;
     _stringLocalizer     = stringLocalizer;
     _spamService         = spamService;
     _eventBus            = eventBus;
     _basicSettings       = basicSettings;
     _distributedCache    = distributedCache;
 }
Beispiel #14
0
 public UserApplicationService(SqlConnection connection, IUserFactory userFactory, IUserRepository userRepository, UserService userService)
 {
     this.connection     = connection;
     this.userFactory    = userFactory;
     this.userRepository = userRepository;
     this.userService    = userService;
 }
 public PointsService(IRepository <AppUser> user, IRepository <GuildUser> guildUser, IUserFactory userFactory, IGuildUserFactory guildUserFactory)
 {
     _user             = user ?? throw new ArgumentNullException(nameof(user));
     _guildUser        = guildUser ?? throw new ArgumentNullException(nameof(guildUser));
     _userFactory      = userFactory ?? throw new ArgumentNullException(nameof(userFactory));
     _guildUserFactory = guildUserFactory ?? throw new ArgumentNullException(nameof(guildUserFactory));
 }
Beispiel #16
0
 public UserService(IEventBus bus, IUserFactory factory, IUserRepo userRepo, IUserLoginRepo loginRepo)
 {
     this.bus       = bus;
     this.factory   = factory;
     this.userRepo  = userRepo;
     this.loginRepo = loginRepo;
 }
Beispiel #17
0
 public UsersService(IUsersRepository usersRepository, IUserFactory userFactory, IBusPublisher busPublisher, IConfiguration configuration)
 {
     _usersRepository = usersRepository;
     _userFactory     = userFactory;
     _busPublisher    = busPublisher;
     _configuration   = configuration;
 }
Beispiel #18
0
 public UserService(IUserRepository userRepository, IUserFactory userFactory, IJwtConfiguration jwtConfiguration, ICorrelationContext correlationContext)
 {
     _userRepository     = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _userFactory        = userFactory ?? throw new ArgumentNullException(nameof(userFactory));
     _jwtConfiguration   = jwtConfiguration ?? throw new ArgumentNullException(nameof(jwtConfiguration));
     _correlationContext = correlationContext ?? throw new ArgumentNullException(nameof(correlationContext));
 }
 public ServerRegisterAction(IUserRepository userRepository, IUserFactory userFactory,
                             IDictionaryConverter <IActionBag> bagConverter)
     : base(bagConverter)
 {
     _userRepository = userRepository;
     _userFactory    = userFactory;
 }
 public UserController(BlogUserManager userManager, IUserFactory userFactory, IRoleFactory roleFactory, BlogRoleManager roleManager)
 {
     _userManager = userManager;
     _userFactory = userFactory;
     _roleFactory = roleFactory;
     _roleManager = roleManager;
 }
 public AddUserCommandHandler(
     IUserRepository userRepository,
     IUserFactory userFactory)
 {
     _userRepository = userRepository;
     _userFactory    = userFactory;
 }
Beispiel #22
0
        /// <summary>
        /// 创建一个用于命令模型的服务容器。
        /// </summary>
        /// <param name="userFactory">用户工厂。</param>
        /// <param name="mockFactoryCallback">模拟的执行器工厂回调函数。</param>
        /// <param name="redisProvider">Redis 提供程序。若为 null 值表示启用基于应用程序域各种提供程序的服务容器。</param>
        /// <returns>服务容器。</returns>
        public static IIocContainer CreateContainer(IUserFactory userFactory
                                                    , Action <MockExecutorFactory> mockFactoryCallback = null
                                                    , IRedisProvider redisProvider = null)
        {
            if (userFactory == null)
            {
                userFactory = new UserFactory(c => null);
            }

            var container = new IocContainer();

            container.Add(userFactory);
            if (redisProvider != null)
            {
                container.Add(redisProvider);
            }

            if (mockFactoryCallback != null)
            {
                var executorFactory = new MockExecutorFactory(container);
                mockFactoryCallback(executorFactory);
                container.Add <IExecutorFactory>(executorFactory);
            }
            if (Db.Engine != null)
            {
                container.Add <IDbEngine>(lmps => Db.Context);
            }
            else
            {
                container.Add <IDbEngine>(lmps => new DbEngine(new SqlEngineProvider("UNIT TEST")));
            }
            return(container);
        }
Beispiel #23
0
 public PersonService(IPersonRepository pr, IPersonFactory pf, IUserRepository ur, IUserFactory uf)
 {
     this.PersonRepository = pr;
     this.PersonFactory = pf;
     this.UserRepository = ur;
     this.UserFactory = uf;
 }
 public TokenService(ITokenFactory tokenFactory, IUserFactory userFactory, IUnitOfWorkFactory unitOfWorkFactory, IUserRepositoryFactory userRepositoryFactory)
 {
     this.tokenFactory          = tokenFactory;
     this.userFactory           = userFactory;
     this.unitOfWorkFactory     = unitOfWorkFactory;
     this.userRepositoryFactory = userRepositoryFactory;
 }
Beispiel #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SecurityService"/> class.
 /// </summary>
 /// <param name="userFactory">User Factory.</param>
 /// <param name="userRepository">User Repository.</param>
 public SecurityService(
     IUserFactory userFactory,
     IUserRepository userRepository)
 {
     this._userFactory    = userFactory;
     this._userRepository = userRepository;
 }
 public UserServices(CocktailMagicianDb context, IUserFactory userFactory, IBannFactory bannFactory, IHasher hasher)
 {
     this.context      = context;
     this.usersFactory = userFactory;
     this.bannFactory  = bannFactory;
     this.hasher       = hasher;
 }
Beispiel #27
0
        public RegisterPresenter(IRegisterView view,
                                 IUserFactory userFactory,
                                 IShoppingCartFactory shoppingCartFactory,
                                 IShoppingCartsService shoppingCartsService) : base(view)
        {
            if (userFactory == null)
            {
                throw new ArgumentNullException("User factory cannot be null.");
            }

            if (shoppingCartFactory == null)
            {
                throw new ArgumentNullException("Shopping cart factory cannot be null.");
            }

            if (shoppingCartsService == null)
            {
                throw new ArgumentNullException("Shopping cart repository cannot be null.");
            }

            this.userFactory          = userFactory;
            this.shoppingCartFactory  = shoppingCartFactory;
            this.shoppingCartsService = shoppingCartsService;
            this.View.Registering    += OnRegistering;
            this.View.SigningIn      += OnSigningIn;
        }
 public UserService(
     IUserPredicateFactory userPredicateFactory,
     IUnitOfWork unitOfWork,
     IUserFactory userFactory,
     IUserUpdater updater,
     IAuditService auditService,
     ITokenService tokenService,
     IRoleService roleService,
     IUserDuplicateValidator userDuplicateValidator,
     ILogService logService,
     ITemplateFactory templateFactory,
     ITemplateService templateService,
     IEmailFactory emailFactory,
     IEmailService emailService,
     IAppSettingsService appSettingsService,
     IInventAppContext inventAppContext)
     : base(
         roleService,
         userFactory,
         updater,
         auditService,
         userDuplicateValidator,
         tokenService,
         unitOfWork,
         logService,
         appSettingsService,
         inventAppContext
         )
 {
     _userPredicateFactory = userPredicateFactory;
     _templateFactory      = templateFactory;
     _templateService      = templateService;
     _emailFactory         = emailFactory;
     _emailService         = emailService;
 }
Beispiel #29
0
 public RestaurantService(ITaisKohtUnitOfWork uow, IRestaurantFactory restaurantFactory, IUserFactory userFactory, UserManager <User> userManager)
 {
     _uow = uow;
     _restaurantFactory = restaurantFactory;
     _userFactory       = userFactory;
     _userManager       = userManager;
 }
Beispiel #30
0
 protected BaseApiController(UserManager userManager, RoleManager roleManager, IUserFactory userFactory, IRoleFactory roleFactory)
 {
     UserManager = userManager;
     RoleManager = roleManager;
     UserFactory = userFactory;
     RoleFactory = roleFactory;
 }
Beispiel #31
0
 public UserManagementController(ICommandBus commandBus, UserManager <IdentityUser> userManager, IUserFactory userFactory, IUserEvents userEvents)
     : base(commandBus)
 {
     this.userManager = userManager;
     this.userFactory = userFactory;
     this.userEvents  = userEvents;
 }
 public UserController(
     IUserQueryExecutor userQueryExecutor,
     ITweetFactory tweetFactory,
     IUserFactory userFactory)
 {
     _userQueryExecutor = userQueryExecutor;
     _tweetFactory = tweetFactory;
     _userFactory = userFactory;
 }
 public TweetWithSearchMetadata(
     ITweetWithSearchMetadataDTO tweetDTO, 
     ITweetController tweetController, 
     ITweetFactory tweetFactory, 
     IUserFactory userFactory, 
     ITaskFactory taskFactory) 
     : base(tweetDTO, tweetController, tweetFactory, userFactory, taskFactory)
 {
     _tweetWithSearchMetadataDTO = tweetDTO;
 }
Beispiel #34
0
 public TwitterList(
     IUserFactory userFactory,
     ITwitterListController twitterListController,
     ITwitterListDTO twitterListDTO,
     ITaskFactory taskFactory)
 {
     _userFactory = userFactory;
     _twitterListController = twitterListController;
     _taskFactory = taskFactory;
     TwitterListDTO = twitterListDTO;
 }
Beispiel #35
0
 public Message(
     IUserFactory userFactory,
     IMessageController messageController,
     IMessageDTO messageDTO,
     ITaskFactory taskFactory)
 {
     _userFactory = userFactory;
     _messageController = messageController;
     _messageDTO = messageDTO;
     _taskFactory = taskFactory;
 }
 public SearchController(
     ISearchQueryExecutor searchQueryExecutor, 
     ISearchResultFactory searchResultFactory,
     ITweetFactory tweetFactory,
     IUserFactory userFactory)
 {
     _searchQueryExecutor = searchQueryExecutor;
     _searchResultFactory = searchResultFactory;
     _tweetFactory = tweetFactory;
     _userFactory = userFactory;
 }
 public TimelineController(
     ITweetFactory tweetFactory,
     ITimelineQueryExecutor timelineQueryExecutor,
     IUserFactory userFactory,
     ITimelineQueryParameterGenerator timelineQueryParameterGenerator)
 {
     _tweetFactory = tweetFactory;
     _timelineQueryExecutor = timelineQueryExecutor;
     _userFactory = userFactory;
     _timelineQueryParameterGenerator = timelineQueryParameterGenerator;
 }
 public TimelineJsonController(
     ITimelineQueryGenerator timelineQueryGenerator,
     ITwitterAccessor twitterAccessor,
     IUserFactory userFactory,
     ITimelineQueryParameterGenerator timelineQueryParameterGenerator)
 {
     _timelineQueryGenerator = timelineQueryGenerator;
     _twitterAccessor = twitterAccessor;
     _userFactory = userFactory;
     _timelineQueryParameterGenerator = timelineQueryParameterGenerator;
 }
 public AccountController(
     IAccountQueryExecutor accountQueryExecutor,
     IUserFactory userFactory,
     IFactory<IAccountSettings> accountSettingsUnityFactory,
     IFactory<IAccountSettingsRequestParameters> accountSettingsRequestParametersFactory)
 {
     _accountQueryExecutor = accountQueryExecutor;
     _userFactory = userFactory;
     _accountSettingsUnityFactory = accountSettingsUnityFactory;
     _accountSettingsRequestParametersFactory = accountSettingsRequestParametersFactory;
 }
Beispiel #40
0
 public PublicController(
     IAuthCookieFactory cookieFactory, 
     IUserFactory userFactory, 
     IDocumentStore documentStore)
 {
     if (cookieFactory == null) throw new ArgumentNullException("cookieFactory");
     if (userFactory == null) throw new ArgumentNullException("userFactory");
     if (documentStore == null) throw new ArgumentNullException("documentStore");
     this.cookieFactory = cookieFactory;
     this.documentStore = documentStore;
     this.userFactory = userFactory;
 }
Beispiel #41
0
 public UserModel(
     [NotNull] IUserDal dal,
     [NotNull] IUserFactory userFactory,
     [NotNull] IAuthenticationFactory authenticationFactory,
     [NotNull] IRandomHexIdentifiers randomHexIdentifiers,
     [NotNull] IGoogleIdTokenVerifier googleIdTokenVerifier)
 {
     this.dal = dal;
     this.userFactory = userFactory;
     this.authenticationFactory = authenticationFactory;
     this.randomHexIdentifiers = randomHexIdentifiers;
     this.googleIdTokenVerifier = googleIdTokenVerifier;
 }
Beispiel #42
0
 public Mention(
     ITweetDTO tweetDTO,
     ITweetController tweetController,
     ITweetFactory tweetFactory,
     IUserFactory userFactory,
     ITaskFactory taskFactory)
     : base(tweetDTO,
                tweetController,
                tweetFactory,
                userFactory,
                taskFactory)
 {
     // Default constructor inheriting from the default Tweet constructor
 }
 public FriendshipController(
     IFriendshipQueryExecutor friendshipQueryExecutor,
     IUserFactory userFactory,
     IFriendshipFactory friendshipFactory,
     IFactory<IRelationshipDetails> relationshipFactory,
     IFactory<IRelationshipState> relationshipStateFactory,
     IFactory<IFriendshipAuthorizations> friendshipAuthorizationsFactory)
 {
     _friendshipQueryExecutor = friendshipQueryExecutor;
     _userFactory = userFactory;
     _friendshipFactory = friendshipFactory;
     _relationshipFactory = relationshipFactory;
     _relationshipStateFactory = relationshipStateFactory;
     _friendshipAuthorizationsFactory = friendshipAuthorizationsFactory;
 }
 public TwitterListController(
     ITweetFactory tweetFactory,
     IUserFactory userFactory,
     ITwitterListQueryExecutor twitterListQueryExecutor,
     ITwitterListFactory twitterListsFactory,
     ITwitterListQueryParameterGenerator twitterListQueryParameterGenerator,
     ITwitterListIdentifierFactory twitterListIdentifierFactory)
 {
     _tweetFactory = tweetFactory;
     _userFactory = userFactory;
     _twitterListQueryExecutor = twitterListQueryExecutor;
     _twitterListsFactory = twitterListsFactory;
     _twitterListQueryParameterGenerator = twitterListQueryParameterGenerator;
     _twitterListIdentifierFactory = twitterListIdentifierFactory;
 }
Beispiel #45
0
        public DealershipEngine(
            IInputOutputProvider provider,
            ICommentFactory commentFactory,
            ICommandFactory commandFactory,
            IUserFactory userFactory,
            IVehicleFactory vehicleFactory)
        {
            this.provider = provider;
            this.commentFactory = commentFactory;
            this.commandFactory = commandFactory;
            this.userFactory = userFactory;
            this.vehicleFactory = vehicleFactory;

            this.users = new Collection<IUser>();
            this.loggedUser = null;
        }
Beispiel #46
0
        public UserStream(
            IStreamResultGenerator streamResultGenerator,
            ITweetFactory tweetFactory,
            IMessageFactory messageFactory,
            IUserFactory userFactory,
            ITwitterListFactory twitterListFactory,
            IJObjectStaticWrapper jObjectWrapper,
            IJsonObjectConverter jsonObjectConverter,
            ITwitterRequestGenerator twitterRequestGenerator,
            IStreamTrackManager<ITweet> streamTrackManager,
            ISynchronousInvoker synchronousInvoker,
            ITaskFactory taskFactory,
            ICustomRequestParameters customRequestParameters,
            ITwitterQueryFactory twitterQueryFactory,
            ISingleAggregateExceptionThrower singleAggregateExceptionThrower)

            : base(
                streamTrackManager,
                jsonObjectConverter,
                jObjectWrapper,
                streamResultGenerator,
                tweetFactory,
                twitterRequestGenerator,
                synchronousInvoker,
                customRequestParameters,
                twitterQueryFactory,
                singleAggregateExceptionThrower)
        {
            _messageFactory = messageFactory;
            _userFactory = userFactory;
            _twitterListFactory = twitterListFactory;
            _jObjectWrapper = jObjectWrapper;
            _taskFactory = taskFactory;
            _twitterQueryFactory = twitterQueryFactory;
            _singleAggregateExceptionThrower = singleAggregateExceptionThrower;

            _events = new Dictionary<string, Action<JObject>>();

            InitializeEvents();
        }
Beispiel #47
0
        public UserLogic(
            IUserRepository userRepository,
            IUserFactory userFactory,
            //IDiscoveryService discoveryService,
            ILoggingService loggerService,
            IUriHelpers uriHelpers,
            ICryptoHelpers cryptoHelpers)
        {
            Ensure.Argument.IsNotNull(userRepository, nameof(userRepository));
            Ensure.Argument.IsNotNull(userFactory, nameof(userFactory));
            //Ensure.Argument.IsNotNull(discoveryService, nameof(discoveryService));
            Ensure.Argument.IsNotNull(loggerService, nameof(loggerService));
            Ensure.Argument.IsNotNull(uriHelpers, nameof(uriHelpers));
            Ensure.Argument.IsNotNull(cryptoHelpers, nameof(cryptoHelpers));

            this.userRepository = userRepository;
            this.userFactory = userFactory;
            //this.discoveryService = discoveryService;
            this.loggerService = loggerService;
            this.uriHelpers = uriHelpers;
            this.cryptoHelpers = cryptoHelpers;
        }
 public UsersController(
     IUserRepository userRepository, IUserFactory userFactory)
 {
     _userRepository = userRepository;
     _userFactory = userFactory;
 }
 public UserRepository(IDatabaseConnection databaseConnection, IUserFactory userFactory)
 {
     this._databaseConnection = databaseConnection;
       this._userFactory = userFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StaffProfileHelper" /> class.
 /// </summary>
 /// <param name="entityContextFactory">The object context factory.</param>
 /// <param name="userFactory">The user factory.</param>
 public StaffProfileHelper(IEntityContextFactory entityContextFactory, IUserFactory userFactory)
 {
     _entityContextFactory = entityContextFactory;
     _userFactory = userFactory;
 }
Beispiel #51
0
 private static void Initialize()
 {
     _userController = TweetinviContainer.Resolve<IUserController>();
     _userFactory = TweetinviContainer.Resolve<IUserFactory>();
 }
Beispiel #52
0
        public Tweet(
            ITweetDTO tweetDTO,
            ITweetController tweetController,
            ITweetFactory tweetFactory,
            IUserFactory userFactory,
            ITaskFactory taskFactory,
            IFactory<IMedia> mediaFactory)
        {
            _tweetController = tweetController;
            _tweetFactory = tweetFactory;
            _userFactory = userFactory;
            _taskFactory = taskFactory;
            _mediaFactory = mediaFactory;

            TweetDTO = tweetDTO;
        }
Beispiel #53
0
 public UserPostHandler(IRepository<User> users, IUserFactory userFactory, ISecureSession<Token> secureSession)
 {
     _users = users;
     _userFactory = userFactory;
     _secureSession = secureSession;
 }