/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(INoteRepository noteRepository, ICategoryRepository categoryRepository) { _noteRepository = noteRepository; _categoryRepository = categoryRepository; Notes = new ObservableCollection<Note>(_noteRepository.FindAll()); Categories = new ObservableCollection<Category>(_categoryRepository.FindAll()); // Is there categories list empty? if (Categories.Count == 0) { // In this case, I will create a default category with a welcome note var cat = new Category(Resources.Strings.GeneralCat, "#33CC00", "#FFFFFF"); Categories.Add(cat); _categoryRepository.SaveAll(Categories); var note = new Note(Resources.Strings.WelcomeMessage, cat); Notes.Add(note); _noteRepository.Save(note); } ActualNote = new Note(); SelectedCategory = _categories[0]; // We need to this for Category's ComboBox sake. Trash = new Category("Trash", "#f8f8f8", "#777777"); AddNoteCommand = new RelayCommand(AddNote, CanAddNote); EditNoteCommand = new RelayCommand<Note>(EditNote); DeleteNoteCommand = new RelayCommand<Note>(DeleteNote); DeleteAllNotesCommand = new RelayCommand(DeleteAllNotes); CategoryOptionsCommand = new RelayCommand(OpenCategoryOptions); // We expect a message with some lists with changes. Messenger.Default.Register<CategoryEditorChangesMessage>(this, MakingNewCatChanges); }
public override void OnCreate() { base.OnCreate(); //NoteRepository = new StandardNoteRepository(this); NoteRepository = new OrmNoteRepository(this); }
public MainWindow() { InitializeComponent(); myNote = new NoteViewModel(); tbxNote.DataContext = myNote; tbxNoteEdit.DataContext = myNote; this._repository = new EFNoteRepository(); dataGrid_load(dataGrid1, DateTime.Today); for (int k = 0; k < 24; k++) { cboHoursEventStart.Items.Add(k.ToString("00")); cboHoursEventFinish.Items.Add(k.ToString("00")); cboHoursEditStart.Items.Add(k.ToString("00")); cboHoursEditFinish.Items.Add(k.ToString("00")); } for (int k = 0; k < 60; k++) { cboMinutesEventStart.Items.Add(k.ToString("00")); cboMinutesEventFinish.Items.Add(k.ToString("00")); cboMinutesEditStart.Items.Add(k.ToString("00")); cboMinutesEditFinish.Items.Add(k.ToString("00")); } }
public NotePresenter(INoteView view, INoteRepository repository) { _view = view; _view.Presenter = this; _repository = repository; LoadNotes(); }
public NoteService(INoteRepository noteRepository, IReferenceGenerator referenceGenerator) { Check.If(noteRepository).IsNotNull(); Check.If(referenceGenerator).IsNotNull(); _noteRepository = noteRepository; _referenceGenerator = referenceGenerator; }
public NoteManager(INoteRepository repo, IUserRepository userRepo, ITaskListManager mgr, INotificationManager notify, IUserListsRepository userNotesRepo, IListUsersRepository noteUsersRepo) { _repository = repo; _userRepository = userRepo; _taskListManager = mgr; _noticationMgr = notify; _userNotesRepo = userNotesRepo; _noteUsersRepo = noteUsersRepo; }
public TasqueObjectFactory(ITaskListRepository taskListRepo, ITaskRepository taskRepo, INoteRepository noteRepo = null) { if (taskListRepo == null) throw new ArgumentNullException ("taskListRepo"); if (taskRepo == null) throw new ArgumentNullException ("taskRepo"); this.taskListRepo = taskListRepo; this.taskRepo = taskRepo; this.noteRepo = noteRepo; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { NoteRepository = new AdoNoteRepository(); _window = new UIWindow (UIScreen.MainScreen.Bounds); _navigationController = new UINavigationController(); _navigationController.PushViewController(new NoteListViewController(), false); _window.RootViewController = _navigationController; _window.MakeKeyAndVisible (); return true; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public NoteViewModel(INoteRepository noteRepository, IHistoryNavigationService navigationService, IProgressService progressService) { _noteRepository = noteRepository; _navigationService = navigationService; _progressService = progressService; _saveNoteCommand = new LoadingRelayCommand(SaveNote, () => CanSaveNote); _removeNoteCommand = new LoadingRelayCommand(RemoveNote); _removeNoteCommand.AddDependentCommand(_saveNoteCommand); _saveNoteCommand.AddDependentCommand(_removeNoteCommand); if (IsInDesignMode) { ActiveNote = noteRepository.GetCollections()[0].CompletedNotes[0]; } }
public ApplicationDetailsService(IApplicationRepository applicationRepository, IBankAgencyRepository bankAgencyRepository, IApplicantRepository applicantRepository, IEmploymentRepository employmentRepository, IAddressRepository addressRepository, IContactRepository contactRepository, IBankAccountRepository bankAccountRepository, IBankCardRepository bankCardRepository, INoteRepository noteRepository, IDocumentRepository documentRepository, IReasonRepository reasonRepository, IActionLogRepository actionLogRepository) { _applicationRepository = applicationRepository; _bankAgencyRepository = bankAgencyRepository; _applicantRepository = applicantRepository; _employmentRepository = employmentRepository; _addressRepository = addressRepository; _contactRepository = contactRepository; _bankAccountRepository = bankAccountRepository; _bankCardRepository = bankCardRepository; _noteRepository = noteRepository; _documentRepository = documentRepository; _reasonRepository = reasonRepository; _actionLogRepository = actionLogRepository; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(INoteRepository noteRepository, IProgressService progressService, IHistoryNavigationService navigationService) { _noteRepository = noteRepository; _progressService = progressService; _navigationService = navigationService; _refreshCommand = new LoadingRelayCommand(Refresh); _addNoteCommand = new LoadingRelayCommand(AddNote, () => CanAddNote); _removeNote = new LoadingRelayCommand<NoteModel>(RemoveNote); _toggleCompleted = new LoadingRelayCommand<NoteModel>(ToggleCompleted); NoteCollections = noteRepository.GetCollections(); NoteCollections.CollectionChanged += NoteCollectionsOnCollectionChanged; if (IsInDesignMode) { ActiveCollection = NoteCollections[0]; } _removeNoteCollection = new LoadingRelayCommand<NoteCollectionModel>(RemoveNoteCollection, CanRemoveNoteCollection); _saveNoteCollection = new LoadingRelayCommand<NoteCollectionModel>(SaveNoteCollection, CanSaveNoteCollection); _addNoteCollectionCommand = new LoadingRelayCommand(AddNoteCollection, () => CanAddNoteCollection); _selectNoteCommand = new RelayCommand<NoteModel>(SelectNote); }
public NotificationRepository(IUserRepository userRepo, ITaskListRepository listRepo, INoteRepository noteRepo) { _userRepository = userRepo; _listRepository = listRepo; _noteRepository = noteRepo; }
public NoteService(INoteRepository repo) { this.repo = repo; }
public MemoService(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NoteController(INoteRepository repository) { _repository = repository; }
public HomeController(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NoteServiceImpl(INoteRepository noteRepository) { this.NoteRepository = noteRepository; }
public NoteService(INoteRepository repositary) { _repositary = repositary; }
public NoteService(IMapper mapper, INoteRepository noteRepository) : base(mapper) { base.InitializeBase(noteRepository); }
public NeckService(INoteRepository noteRepository, ITuningRepository tuningRepository) { _noteRepository = noteRepository; _tuningRepository = tuningRepository; }
public RemaindersController(IOptions <AppSettings> appSettings, INoteRepository context) { _appSettings = appSettings.Value; _context = context; }
public ScaleRepository(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NoteBL() { this.noteRepository = new NoteRepository(); }
// intialise this repo with a dependency injection public TodoController(INoteRepository _noteRepo) { this.noteRepo = _noteRepo; }
public NotesController(ITaskRepository taskRepository, INoteRepository noteRepository) { this.taskRepository = taskRepository; this.noteRepository = noteRepository; }
public CreateNoteCommandHandler(INoteRepository noteRepository, IMediator mediator, IHttpContextAccessor httpContextAccessor) { _noteRepository = noteRepository; _mediator = mediator; _httpContextAccessor = httpContextAccessor; }
public NoteService(INoteRepository noteRepository) { _noteRepository = noteRepository; }
/// <summary> /// Initializes a new instance of the <see cref="GetNotesHandler"/> class. /// </summary> /// <param name="noteRepository">An instance of <see cref="INoteRepository"/> to interact with the notes.</param> /// <param name="mapper">The mapper.</param> /// <exception cref="ArgumentNullException">noteRepository</exception> public GetNotesHandler(INoteRepository noteRepository, IMapper mapper) { _noteRepository = noteRepository ?? throw new ArgumentNullException(nameof(noteRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public NoteController(INoteRepository iNoteRepository) { _iNoteRepository = iNoteRepository; }
public NotesController(ILogger <NotesController> logger, INoteRepository repository) { _logger = logger; _repository = repository; }
protected static DTO.GetNotesResponse GetStoredNotes(INoteRepository note_repo) { var notes = new List<DTO.DTONote> (); var stored_notes = note_repo.Engine.GetNotes (); foreach (var kvp in stored_notes) { var note = kvp.Value.ToDTONote (); // if we have a sync revision, set it if (note_repo.Manifest.NoteRevisions.Keys.Contains (note.Guid)) { note.LastSyncRevision = note_repo.Manifest.NoteRevisions [note.Guid]; } notes.Add (note); } var return_notes = new DTO.GetNotesResponse (); return_notes.Notes = notes; return_notes.LatestSyncRevision = note_repo.Manifest.LastSyncRevision; return return_notes; }
public NoteDataService() { this._noteRepository = (INoteRepository)Mvx.get_IoCProvider().Resolve <INoteRepository>(); this._settingsDataService = (ISettingsDataService)Mvx.get_IoCProvider().Resolve <ISettingsDataService>(); }
public NoteEntryPage() { InitializeComponent(); noteRepository = new NoteRepository(); BindingContext = new Note(); }
public NoteService(INoteRepository noteRepository, IRepository <User> userRepository) { _noteRepository = noteRepository; _userRepository = userRepository; }
public void Initialize(IPreferences preferences) { if (preferences == null) throw new ArgumentNullException ("preferences"); if (IsInitialized) return; // Establish connection to backend // Nothing to do for Dummy Backend // Setup repos noteRepo = new NoteRepository (this); taskListRepo = new TaskListRepository (this); taskRepo = new TaskRepository (this); // Setup TasqueObjectFactory Factory = new TasqueObjectFactory ( taskListRepo, taskRepo, noteRepo); IsConfigured = true; IsInitialized = true; if (Initialized != null) Initialized (this, EventArgs.Empty); }
public HomeController(INoteRepository repository, IConfiguration config) { _noteRepository = repository; }
// // GET: /Navigation/ public MenuController(INoteRepository paramRepo) { repository = paramRepo; }
/* * Use constructor Injection to inject all required dependencies. */ public NoteService(INoteRepository repository, ICategoryRepository category, IReminderRepository reminder) { noteRepo = repository; categoryRepo = category; reminderRepo = reminder; }
public NotesController(NoteContext context) { _context = context; _noteRepository = new NoteRepository(_context); }
public NoteRepositoryTests() { _sut = Substitute.For <INoteRepository>(); }
public NoteDomain() { _noteRepository = new NoteRepository(); }
public NotesController(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NotesController(ICommandInvoker commandInvoker, INoteRepository noteRepository, IUserRepository userRepository) { this.commandInvoker = commandInvoker; this.userRepository = userRepository; this.noteRepository = noteRepository; }
public WhatsNewViewComponent(INoteRepository repository) { _repository = repository; }
public ListUsersRepository(IUserRepository userRepository, ITaskListRepository taskListRepository, INoteRepository noteRepository) { _userRepository = userRepository; _taskListRepository = taskListRepository; _noteRepository = noteRepository; }
public NoteService(INoteRepository noteRepository) { NoteRepository = noteRepository; }
/// <summary> /// Constructs the Note service using Structure Map to inject the required repositories /// </summary> /// <param name="noteRepository">The SM Injected note repository.</param> /// <param name="boardRepository">The SM INjected board repository.</param> public NoteService(INoteRepository noteRepository, IBoardRepository boardRepository) { _noteRepository = noteRepository; _boardRepository = boardRepository; }
public NotesTests() { repo = new TestNoteRepo(); }
public NoteLogic(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NoteService(INoteRepository noteRepository, ITriageRepository triageRepository, ITicketRepository ticketRepository) { this.noteRepository = noteRepository; this.ticketRepository = ticketRepository; this.triageRepository = triageRepository; }
public NoteManager() { Repository = IoC.Instance.Resolve<INoteRepository>(); }
public NoteAPIController(INoteRepository noteRepository, INoteTypeRepository noteTypeRepository) { _noteRepository = noteRepository; _noteTypeRepository = noteTypeRepository; }
public override void OnCreate() { base.OnCreate(); NoteRepository = new NoteRepository (this); }
public SystemController(INoteRepository noteRepository) { _noteRepository = noteRepository; }
public NoteController() { _repository = new NoteRepository(); }
public NoteDeleteHandler(INoteRepository noteRepository, IGroupRepository groupRepository) { _noteRepository = noteRepository; _groupRepository = groupRepository; }
public CategoryList(INoteRepository repo) { repository = repo; }
public void Setup() { _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConectionString"); _mockContext.Setup(x => x.Notes).Returns(_mockDbSet.Object); _mockContext.Setup(x => x.SaveChanges()).Returns(1); _mockNoteMapper.Setup(x => x.Map(It.IsAny<Note>(), It.IsAny<Note>())); _noteRepository = new NoteRepository(_mockContext.Object, _mockNoteMapper.Object); }
public NoteController(INoteRepository db, IPermissionChecker userDb) { this.db = db; this.userDb = userDb; }
public MartenDataStore(IDocumentStore documentStore) { session = documentStore.LightweightSession(); notes = new NoteRepository(session); }