Exemplo n.º 1
0
 public RestClient(IHttpClientFactory clientFactory, IToaster toaster, IOptions <AppSettings> settings)
 {
     _httpClient = clientFactory.CreateClient("iLAPs-Client");
     _toaster    = toaster;
     _settings   = settings;
     _httpClient.DefaultRequestHeaders.Add("Accept", "application/json;odata=nometadata");
 }
Exemplo n.º 2
0
 public AppState(LocalStorage localStorage, IToaster toaster, HttpClient httpClient)
 {
     this.localStorage = localStorage;
     this.toaster      = toaster;
     this.httpClient   = httpClient;
     GetSearchHistory();
 }
Exemplo n.º 3
0
 public LoggerDataService(IOptions <AppSettings> settings, IRestClient rest, IToaster toaster, IHttpContextAccessor contextAccessor)
 {
     _toaster         = toaster;
     _settings        = settings;
     http             = rest;
     helper           = new DecryptStringData();
     _contextAccessor = contextAccessor;
 }
Exemplo n.º 4
0
 public FileIOHelper(
     IToaster toaster,
     IConfiguration config
     )
 {
     _toaster = toaster;
     _config  = config;
 }
Exemplo n.º 5
0
 public TagController(
     ApplicationDbContext context,
     IToaster toaster
     )
 {
     _context = context;
     _toaster = toaster;
 }
Exemplo n.º 6
0
        public void Startup()
        {
            nav_mock = new Mock <INavigationService>();
            nav      = nav_mock.Object;

            toaster_mock = new Mock <IToaster>();
            toaster      = toaster_mock.Object;

            item_report_storage = new VolatileItemReportStorage();
        }
Exemplo n.º 7
0
 public UserController(
     ApplicationDbContext context,
     UserManager <ApplicationUser> userManager,
     IToaster toaster
     )
 {
     _toaster     = toaster;
     _userManager = userManager;
     _context     = context;
 }
Exemplo n.º 8
0
 public ToasterService(IToaster service)
 {
     _service                = service;
     _maximumOpacity         = _service.Configuration.MaximumOpacity;
     _escapeHtml             = _service.Configuration.EscapeHtml;
     _requireInteraction     = _service.Configuration.RequireInteraction;
     _showProgressBar        = _service.Configuration.ShowProgressBar;
     _showCloseIcon          = _service.Configuration.ShowCloseIcon;
     _showTransitionDuration = _service.Configuration.ShowTransitionDuration;
     _visibleStateDuration   = _service.Configuration.VisibleStateDuration;
     _hideTransitionDuration = _service.Configuration.HideTransitionDuration;
 }
Exemplo n.º 9
0
        public ReportItemViewModel(IPictureTaker picture_taker,
                                   IPictureSelector picture_selector, IToaster toaster,
                                   IGeolocator geolocator,
                                   ItemReportStorage item_report_storage)
        {
            this.PictureTaker      = picture_taker;
            this.PictureSelector   = picture_selector;
            this.Toaster           = toaster;
            this.ItemReportStorage = item_report_storage;
            this.Geolocator        = geolocator;

            this.Title = "Create new item report";
        }
Exemplo n.º 10
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     IToaster toaster)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     _logger        = logger;
     _toaster       = toaster;
 }
Exemplo n.º 11
0
 public HomeController(
     ILogger <AccountController> logger,
     ApplicationDbContext context,
     CommentController commentController,
     UserController userController,
     IToaster toaster
     )
 {
     _commentController = commentController;
     _userController    = userController;
     _context           = context;
     _logger            = logger;
     _toaster           = toaster;
 }
Exemplo n.º 12
0
 public ManageController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <ManageController> logger,
     IToaster toaster,
     UrlEncoder urlEncoder,
     ApplicationDbContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     _logger        = logger;
     _toaster       = toaster;
     _urlEncoder    = urlEncoder;
     _context       = context;
 }
Exemplo n.º 13
0
        public ArticleController(
            ApplicationDbContext context,
            IAuthorizationService aus,
            UserManager <ApplicationUser> userManager,
            CommentController commentController,
            UserController userController,
            IFileIOHelper io_Helper,
            IToaster toaster,
            IConfiguration config

            )
        {
            _aus               = aus;
            _userManager       = userManager;
            _context           = context;
            _commentController = commentController;
            _userController    = userController;
            _io_Helper         = io_Helper;
            _toaster           = toaster;
            _config            = config;
        }
Exemplo n.º 14
0
 public MainViewModel(
     IWebBrowser webBrowser,
     IJsReportProxy jsReportProxy,
     IHtmlProvider htmlProvider,
     IScriptManager scriptManager,
     IGenerator generator,
     IToaster toaster
     )
 {
     Settings = new SettingsViewModel(jsReportProxy, this);
     scriptManager.Initialize(this, Settings, this, jsReportProxy);
     webBrowser.ObjectForScripting = scriptManager;
     webBrowser.Navigate(htmlProvider.GetPath());
     this.generator       = generator;
     this.toaster         = toaster;
     this.jsReportProxy   = jsReportProxy;
     SelectProjectCommand = new RelayCommand <object>(_ =>
     {
         OpenFileDialog openFileDialog = new OpenFileDialog();
         openFileDialog.Filter         = "dll|*.dll";
         if (openFileDialog.ShowDialog() == true)
         {
             var dll  = openFileDialog.FileName;
             var name = System.IO.Path.GetFileNameWithoutExtension(dll);
             this.AddTestProject(new TestProject {
                 name = name, path = dll
             });
         }
     });
     ClearProjectsCommand = new RelayCommand <object>(_ =>
     {
         TestProjects.Clear();
         //going to mimic a new solution here
         jsReportProxy.ProjectsAdded(new TestProject[] { }, true);
     });
 }
Exemplo n.º 15
0
        public Bucket(
            IStringRing ringBuffer,
            IFilter filter,
            IToaster toaster,
            IDeduper deduper,
            IAudioAlert audioAlert
            )
        {
            Buffer      = ringBuffer ?? throw new ArgumentNullException(nameof(ringBuffer));
            Filter      = filter ?? throw new ArgumentNullException(nameof(filter));
            _toaster    = toaster ?? throw new ArgumentNullException(nameof(toaster));
            _deduper    = deduper ?? throw new ArgumentNullException(nameof(deduper));
            _audioAlert = audioAlert ?? throw new ArgumentNullException(nameof(audioAlert));

            _deduper.Items    = Buffer.Items;
            _deduper.Selector = (_) => { return(_?.Substring(21)); }; //chop off the timestamp

            Filter.PropertyChanged += (o, e) => { Buffer.Clear(); };

            _toaster.Passthrough = _audioAlert.Passthrough = true;
            Name   = DefaultName;
            Size   = DefaultSize;
            Dedupe = true;
        }
Exemplo n.º 16
0
 public SelectLocationViewModel(IGeolocator geolocator, IToaster toaster)
 {
     this.Geolocator = geolocator;
     this.Toaster    = toaster;
 }