Example #1
0
 public TextViewModel(INavigationService navigationService, IWallRepository repo, IWallEntryCreator creator, IUserNameProvider userInfo)
 {
     _navigationService = navigationService;
     _repo     = repo;
     _creator  = creator;
     _userInfo = userInfo;
 }
Example #2
0
 public ShareController(DataContext db, IUserNameProvider userNames, ShareStatusService shareStatus)
     : base(db, shareStatus)
 {
     Ensure.NotNull(db, "db");
     Ensure.NotNull(userNames, "userNames");
     this.db        = db;
     this.userNames = userNames;
 }
Example #3
0
        public static async Task <string> GetUserNameAsync(this IUserNameProvider provider, string userId)
        {
            Ensure.NotNull(provider, "provider");
            Ensure.NotNullOrEmpty(userId, "userId");
            var userNames = await provider.GetUserNamesAsync(new[] { userId });

            return(userNames.First());
        }
 public HomeControllerService(IWalletsProvider walletsProvider,
                              ITransactionsProvider transactionsProvider, ITimeBalanceProvider timeBalanceProvider, IMapper mapper, IUserNameProvider userNameProvider)
 {
     _walletsProvider      = walletsProvider ?? throw new ArgumentNullException(nameof(walletsProvider));
     _transactionsProvider = transactionsProvider ?? throw new ArgumentNullException(nameof(transactionsProvider));
     _timeBalanceProvider  = timeBalanceProvider ?? throw new ArgumentNullException(nameof(timeBalanceProvider));
     _mapper           = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _userNameProvider = userNameProvider ?? throw new ArgumentNullException(nameof(userNameProvider));
 }
Example #5
0
 public TimelineController(DataContext dataContext, IUserNameProvider userNames, ShareStatusService shareStatus)
     : base(dataContext, shareStatus)
 {
     Ensure.NotNull(dataContext, "dataContext");
     Ensure.NotNull(userNames, "userNames");
     Ensure.NotNull(shareStatus, "shareStatus");
     this.dataContext = dataContext;
     this.userNames   = userNames;
     this.shareStatus = shareStatus;
 }
Example #6
0
        public ImageTableStorage(IUserNameProvider userNameProvider, ICloudStorageAccountProvider cloudStorageAccountProvider, IConnectionStringProvider connectionStringProvider)
        {
            this.userNameProvider         = userNameProvider;
            this.connectionStringProvider = connectionStringProvider;
            cloudStorageAccount           = cloudStorageAccountProvider.CloudStorageAccount;
            var tableClient = cloudStorageAccount.CreateCloudTableClient();

            imageTable = tableClient.GetTableReference(userNameProvider.UserName);

            blobServiceClient   = cloudStorageAccountProvider.BlobServiceClient;
            blobContainerClient = blobServiceClient.GetBlobContainerClient(userNameProvider.UserName);
        }
        public ImageTableStorage(ICloudStorageAccountProvider cloudStorageAccountProvider, IUserNameProvider userNameProvider)
        {
            this.cloudStorageAccountProvider = cloudStorageAccountProvider;
            this.userNameProvider            = userNameProvider;

            var blobClient = this.cloudStorageAccountProvider.BlobStorageAccount.CreateCloudBlobClient();

            this.cloudBlobContainer = blobClient.GetContainerReference(this.userNameProvider.UserName);

            var tableClient = this.cloudStorageAccountProvider.TableStorageAccount.CreateCloudTableClient();

            this.cloudTable = tableClient.GetTableReference(this.userNameProvider.UserName);
        }
Example #8
0
 public BeingController(DataContext db, IUserNameProvider userNames, ShareStatusService shareStatus, ShareDeleter shareDeleter, FreeLimitsChecker freeLimits)
     : base(db, shareStatus)
 {
     Ensure.NotNull(db, "db");
     Ensure.NotNull(userNames, "userNames");
     Ensure.NotNull(shareStatus, "shareStatus");
     Ensure.NotNull(shareDeleter, "shareDeleter");
     Ensure.NotNull(freeLimits, "freeLimits");
     this.db           = db;
     this.userNames    = userNames;
     this.shareStatus  = shareStatus;
     this.shareDeleter = shareDeleter;
     this.freeLimits   = freeLimits;
 }
Example #9
0
 public ImageController(ImageService service, DataContext dataContext, IFileStorage fileProvider, ShareStatusService shareStatus, IUserNameProvider userNames, FreeLimitsChecker freeLimits)
     : base(dataContext, shareStatus)
 {
     Ensure.NotNull(service, "service");
     Ensure.NotNull(dataContext, "dataContext");
     Ensure.NotNull(fileProvider, "fileProvider");
     Ensure.NotNull(shareStatus, "shareStatus");
     Ensure.NotNull(userNames, "userNames");
     Ensure.NotNull(freeLimits, "freeLimits");
     this.service      = service;
     this.dataContext  = dataContext;
     this.fileProvider = fileProvider;
     this.shareStatus  = shareStatus;
     this.userNames    = userNames;
     this.freeLimits   = freeLimits;
 }
Example #10
0
 /// <summary>
 ///     <para>
 ///         Creates a <see cref="Builder" /> with <paramref name="configurement" />.
 ///     </para>
 /// </summary>
 /// <param name="configurement">
 ///     The configuration for the <see cref="Builder" />.
 /// </param>
 public Builder(Configurement configurement)
 {
     _doubleProvider         = configurement.DoubleProvider;
     _intProvider            = configurement.IntProvider;
     _longProvider           = configurement.LongProvider;
     _nameProvider           = configurement.NameProvider;
     _dateTimeProvider       = configurement.DateTimeProvider;
     _emailProvider          = configurement.MailProvider;
     _elementProvider        = configurement.ListElementPicker;
     _boolProvider           = configurement.BoolProvider;
     _userNameProvider       = configurement.UserNameProvider;
     _guidProvider           = configurement.GuidProvider;
     _timeSpanProvider       = configurement.TimeSpanProvider;
     _decimalProvider        = configurement.DecimalProvider;
     _dateTimeOffsetProvider = configurement.DateTimeOffSetProvider;
     _floatProvider          = configurement.FloatProvider;
     _charProvider           = configurement.CharProvider;
 }
Example #11
0
 public CameraViewModel(INavigationService navigationService, IPhotoDevice photoDevice,
                        IImageHelper imageHelper, IOrientationChangeHandler orientationHandler,
                        IPreviewOrientationHelper previewOrientationHelper, IUserNameProvider userData,
                        IWallEntryCreator creator, IWallRepository repo, IStorageProvider storageProvider, IStateManager stateManager)
 {
     _navigationService        = navigationService;
     _photoDevice              = photoDevice;
     _imageHelper              = imageHelper;
     _orientationHandler       = orientationHandler;
     _previewOrientationHelper = previewOrientationHelper;
     _userData                 = userData;
     _creator                  = creator;
     _repo                     = repo;
     _storageProvider          = storageProvider;
     _stateManager             = stateManager;
     _stateManager.Suspending += Suspending;
     _stateManager.Resuming   += Resuming;
 }
 public CachedUserNameProvider(IUserNameProvider nameProvider)
 {
     this.nameProvider = nameProvider;
     name = nameProvider.GetName();
 }
 public ImagesController(ImageTableStorage imageTableStorage, IUserNameProvider userNameProvider)
 {
     this.imageTableStorage = imageTableStorage;
     this.userNameProvider  = userNameProvider;
 }
Example #14
0
        public static void SetUserNameProvider([NotNull] IUserNameProvider userNameProvider)
        {
            Assert.ArgumentNotNull(userNameProvider, nameof(userNameProvider));

            _userNameProvider = userNameProvider;
        }
 public MainScreenViewModel(IStartGame startGame, IConfigServer configServer)
 {
     MainMenu         = new MainMenuViewModel(startGame, this, configServer);
     userNameProvider = new CachedUserNameProvider(new FileUserNameProvider("user_name.txt"));
     popUpController  = new ChangeNamePopUpController();
 }
Example #16
0
 public UserNameDecorator(IUserNameProvider userNameProvider)
 {
     _userNameProvider = userNameProvider;
 }
 public MainViewModel(IUserNameProvider userNameProvider, INavigationService navigationService)
 {
     _userNameProvider  = userNameProvider;
     _navigationService = navigationService;
     _userName          = "******";
 }
Example #18
0
 public AppDbContext(DbContextOptions <AppDbContext> options, IUserNameProvider userNameProvider)
     : base(options)
 {
     _userNameProvider = userNameProvider;
 }
Example #19
0
 public UserNameDecorator(IUserNameProvider userNameProvider)
 {
     _userNameProvider = userNameProvider;
 }