Ejemplo n.º 1
0
 protected BaseDataListViewModel(ViewModelServiceContainer container)
     : base(container.Messenger)
 {
     _log = container.Log;
     _translationService = container.LocalizationService;
     _sequenceProvider   = container.SequenceService;
 }
Ejemplo n.º 2
0
        public Playlist(ViewModelServiceContainer container, IValidator <Playlist> validator, DialogViewModel dialogViewModel, Data.Playlist model)
            : base(model, validator, container.Messenger)
        {
            using (BusyStack.GetToken())
            {
                _itemsLock        = new object();
                _dialogViewModel  = dialogViewModel ?? throw new ArgumentNullException(nameof(dialogViewModel), $"{nameof(dialogViewModel)} {Resources.IsRequired}");
                _sequenceProvider = container.SequenceService;

                _translator   = container.LocalizationService;
                _title        = model.Title;
                _description  = model.Description;
                _repeatMode   = (RepeatMode)model.RepeatMode;
                _isShuffeling = model.IsShuffeling;
                _sequence     = model.Sequence;

                RepeatModes = new RangeObservableCollection <RepeatMode>(Enum.GetValues(typeof(RepeatMode)).Cast <RepeatMode>().ToList());
                History     = new Stack <int>();

                Items = new RangeObservableCollection <MediaItem>();
                Items.CollectionChanged += (o, e) => OnPropertyChanged(nameof(Count));
                BindingOperations.EnableCollectionSynchronization(Items, _itemsLock);
                View = CollectionViewSource.GetDefaultView(Items);
                OnPropertyChanged(nameof(Count));

                InitializeCommands();
                Validate();
            }
        }
Ejemplo n.º 3
0
 // Constructor
 public SequenceController(
     ISequenceService sequenceService,
     ISequenceStrategyFactory sequenceStrategyFactory)
 {
     _sequenceService         = sequenceService;
     _sequenceStrategyFactory = sequenceStrategyFactory;
 }
Ejemplo n.º 4
0
 public InvestController(IActionStation actionStation,
     ISequenceService sequenceService,
     IInvestmentService investmentService) 
     : base(actionStation)
 {
     _sequenceService = sequenceService;
     _investmentService = investmentService;
 }
Ejemplo n.º 5
0
 public NodeController(ISequenceService sequenceService,
                       Grit.Tree.ITreeService treeService,
                       INodeService nodeService)
 {
     this.SequenceService = sequenceService;
     this.NodeService     = nodeService;
     this.TreeService     = treeService;
 }
Ejemplo n.º 6
0
 public BookingController(IActionBus actionBus,
     ISequenceService sequenceService,
     IBookingService bookingService)
 {
     _actionBus = actionBus;
     _sequenceService = sequenceService;
     _bookingService = bookingService;
 }
Ejemplo n.º 7
0
 public TransactionsController(ILog log,
                               ISequenceService sequenceService,
                               IBuildRepository buildRepository)
 {
     _log             = log;
     _sequenceService = sequenceService;
     _buildRepository = buildRepository;
 }
Ejemplo n.º 8
0
 public InvestController(IActionStation actionStation,
                         ISequenceService sequenceService,
                         IInvestmentService investmentService)
     : base(actionStation)
 {
     _sequenceService   = sequenceService;
     _investmentService = investmentService;
 }
Ejemplo n.º 9
0
 public KnowledgeBasesController(ApplicationDbContext context,
                                 ISequenceService sequenceService,
                                 IStorageService storageService, ILogger <KnowledgeBasesController> logger)
 {
     _context         = context;
     _sequenceService = sequenceService;
     _storageService  = storageService;
     _logger          = logger;
 }
Ejemplo n.º 10
0
 protected BaseMapper(ViewModelServiceContainer container, IValidator <T> validator)
 {
     _container          = container;
     _translationService = container.LocalizationService;
     _sequenceProvider   = container.SequenceService;
     _log       = container.Log;
     _messenger = container.Messenger;
     _validator = validator ?? throw new ArgumentNullException(nameof(validator), $"{nameof(validator)} {Resources.IsRequired}");
 }
Ejemplo n.º 11
0
 public HomeController(ISequenceService sequenceService,
                       Grit.Tree.ITreeService treeService,
                       INodeService nodeService,
                       IUserService userService)
 {
     this.SequenceService = sequenceService;
     this.NodeService     = nodeService;
     this.TreeService     = treeService;
     this.UserService     = userService;
 }
Ejemplo n.º 12
0
 public BalancesController(ILog log,
                           ISequenceService sequenceService,
                           IBalanceRepository balanceRepository,
                           IBalancePositiveRepository balancePositiveRepository)
 {
     _log                       = log;
     _sequenceService           = sequenceService;
     _balanceRepository         = balanceRepository;
     _balancePositiveRepository = balancePositiveRepository;
 }
Ejemplo n.º 13
0
 public ClientController(ISequenceService sequenceService,
                         Grit.Tree.ITreeService treeService,
                         IClientService clientService,
                         INodeService nodeService)
 {
     this.SequenceService = sequenceService;
     this.ClientService   = clientService;
     this.TreeService     = treeService;
     this.NodeService     = nodeService;
 }
Ejemplo n.º 14
0
 public KnowledgeBasesController(ApplicationDbContext context,
                                 ISequenceService sequenceService,
                                 IStorageService storageService,
                                 ILogger <KnowledgeBasesController> logger)
 {
     _context         = context;
     _sequenceService = sequenceService;
     _storageService  = storageService;
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 /// <summary>
 /// CONSTRUCTOR CONTROLLER.
 /// </summary>
 /// <param name="context">DbContext.</param>
 public KnowledgeBasesController(KnowledgeSpaceContext context,
                                 ISequenceService sequenceService,
                                 IStorageService storageService,
                                 ICacheService cacheService)
 {
     _context         = context;
     _sequenceService = sequenceService;
     _storageService  = storageService;
     _cacheService    = cacheService;
 }
Ejemplo n.º 16
0
 public SecurityController(IAuthenticator authenticator, 
     IActionBus actionBus,
     IEventBus eventBus,
     ISequenceService sequenceService,
     IUserSecurityService userSecurityService) 
     : base(authenticator, actionBus)
 {
     EventBus = eventBus;
     _sequenceService = sequenceService;
     _userSecurityService = userSecurityService;
 }
Ejemplo n.º 17
0
        public Playlist(ViewModelServiceContainer container, IValidator <Playlist> validator, IDialogViewModel dialogViewModel, IMediaItemMapper mediaItemMapper, PlaylistModel model)
            : base(model, validator, container?.Messenger)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container), $"{nameof(container)} {Resources.IsRequired}");
            }

            SkipChangeTracking = true;
            using (BusyStack.GetToken())
            {
                _itemsLock = new object();

                _mediaItemMapper  = mediaItemMapper ?? throw new ArgumentNullException(nameof(mediaItemMapper), $"{nameof(mediaItemMapper)} {Resources.IsRequired}");
                _dialogViewModel  = dialogViewModel ?? throw new ArgumentNullException(nameof(dialogViewModel), $"{nameof(dialogViewModel)} {Resources.IsRequired}");
                _sequenceProvider = container.SequenceService;

                _translator   = container.LocalizationService;
                _title        = model.Title;
                _description  = model.Description;
                _repeatMode   = (RepeatMode)model.RepeatMode;
                _isShuffeling = model.IsShuffeling;
                _sequence     = model.Sequence;

                RepeatModes = new RangeObservableCollection <RepeatMode>(Enum.GetValues(typeof(RepeatMode)).Cast <RepeatMode>().ToList());
                _history    = new Stack <int>();

                Items = new RangeObservableCollection <MediaItem>();
                _items.CollectionChanged += (o, e) => OnPropertyChanged(nameof(Count));

                BindingOperations.EnableCollectionSynchronization(Items, _itemsLock);
                View = CollectionViewSource.GetDefaultView(Items); // TODO add sorting by sequence
                OnPropertyChanged(nameof(Count));

                LoadFromFileCommand   = AsyncCommand.Create(LoadFromFile, () => CanLoadFromFile());
                LoadFromFolderCommand = AsyncCommand.Create(LoadFromFolder, () => CanLoadFromFolder());
                LoadFromUrlCommand    = AsyncCommand.Create(LoadFromUrl, () => CanLoadFromUrl());

                RemoveCommand      = new RelayCommand <object>(Remove, CanRemove);
                RemoveRangeCommand = new RelayCommand <IList>(RemoveRange, CanRemoveRange);
                ClearCommand       = new RelayCommand(() => Clear(), CanClear);

                AddRange(_mediaItemMapper.GetMany(model.MediaItems));

                MessageTokens.Add(Messenger.Subscribe <PlayingMediaItemMessage>(OnPlaybackItemChanged, m => m.PlaylistId == Id && _items.Contains(m.Content)));

                Validate();
            }
            SkipChangeTracking = false;
        }
 public KnowledgeBasesController(ApplicationDbContext context,
                                 ISequenceService sequenceService,
                                 IStorageService storageService,
                                 ILogger <KnowledgeBasesController> logger,
                                 IEmailSender emailSender,
                                 IViewRenderService viewRenderService,
                                 ICacheService cacheService)
 {
     _context           = context;
     _sequenceService   = sequenceService;
     _storageService    = storageService;
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
     _emailSender       = emailSender;
     _viewRenderService = viewRenderService;
     _cacheService      = cacheService;
 }
Ejemplo n.º 19
0
        public AnimalsController(
            IMapper mapper,
            IBlFullCrud <AnimalDto, AnimalDto, Guid> animalService,
            IImageService imageService,
            ISequenceService sequenceService
            )
        {
            Require.Objects.NotNull(mapper, nameof(mapper));
            Require.Objects.NotNull(animalService, nameof(animalService));
            Require.Objects.NotNull(imageService, nameof(imageService));

            _mapper             = mapper;
            this._animalService = animalService;
            _imageService       = imageService;
            _sequenceService    = sequenceService;
        }
Ejemplo n.º 20
0
 public ProductsController(ApplicationDbContext context,
                           ILogger <ProductsController> logger,
                           IMapper mapper,
                           IStringLocalizer <ProductsController> localizer,
                           IString returnString,
                           ISequenceService sequenceService,
                           IStorageService storageService)
 {
     _context         = context;
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _mapper          = mapper;
     _localizer       = localizer;
     _returnString    = returnString;
     _sequenceService = sequenceService;
     _storageService  = storageService;
 }
Ejemplo n.º 21
0
 public InvestController(IActionBus actionBus, IServiceBus serviceBus,
     ISequenceService sequenceService)
     : base(actionBus, serviceBus)
 {
     _sequenceService = sequenceService;
 }
Ejemplo n.º 22
0
 public InvestController(ISequenceService sequenceService,
                         IInvestmentService investmentService)
 {
     _sequenceService   = sequenceService;
     _investmentService = investmentService;
 }
Ejemplo n.º 23
0
 public AddressesController(ISequenceService sequenceService)
 {
     _sequenceService = sequenceService;
 }
Ejemplo n.º 24
0
 public InvestController(IActionBus actionBus, IServiceBus serviceBus,
                         ISequenceService sequenceService)
     : base(actionBus, serviceBus)
 {
     _sequenceService = sequenceService;
 }
Ejemplo n.º 25
0
 public void Initialize()
 {
     Service = new SequenceService();
 }
Ejemplo n.º 26
0
 public HomeController(ISequenceService sequence)
 {
     sequenceService = sequence;
 }
Ejemplo n.º 27
0
 public InvestController(ISequenceService sequenceService,
     IInvestmentService investmentService)
 {
     _sequenceService = sequenceService;
     _investmentService = investmentService;
 }
 public SequenceController(ISequenceService sequenceService)
 {
     _sequenceService = sequenceService;
 }
Ejemplo n.º 29
0
 public ShortLinkService(IOptions <ShortLinkOptions> options, ICacheService cacheService, ISequenceService sequenceService)
 {
     this.options         = options.Value;
     this.cacheService    = cacheService;
     this.sequenceService = sequenceService;
 }
Ejemplo n.º 30
0
 public WalletsController(ISequenceService sequenceService)
 {
     _sequenceService = sequenceService;
 }
Ejemplo n.º 31
0
 public ViewModelServiceContainer(ILoggingService log, ILoggingNotifcationService notificationService, ILocalizationService localizationService, IMessenger messenger, ISequenceService sequenceService)
 {
     Log = log ?? throw new ArgumentNullException(nameof(log), $"{nameof(log)} {Resources.IsRequired}");
     LocalizationService = localizationService ?? throw new ArgumentNullException(nameof(localizationService), $"{nameof(localizationService)} {Resources.IsRequired}");
     SequenceService     = sequenceService ?? throw new ArgumentNullException(nameof(sequenceService), $"{nameof(sequenceService)} {Resources.IsRequired}");
     Messenger           = messenger ?? throw new ArgumentNullException(nameof(messenger), $"{nameof(messenger)} {Resources.IsRequired}");
     NotificationService = notificationService ?? throw new ArgumentNullException(nameof(notificationService), $"{nameof(notificationService)} {Resources.IsRequired}");
 }
 public void SetUp()
 {
     _sequenceServiceMock = Substitute.For <ISequenceService>();
     _sequenceController  = new SequenceController(_sequenceServiceMock);
 }
Ejemplo n.º 33
0
 public TestController(ISequenceService authenticator)
 {
 }