public AddNoteViewModel(INoteService NoteService) { this.NoteService = NoteService; this.Note = new Note(); this.AddNoteCommand = new RelayCommand<Note>(AddNote); this.InitializeCommand = new RelayCommand(Initialize); }
/// <summary> /// Initializes a new instance of the <see cref="NoteApiController"/> class. /// </summary> /// <param name="merchelloContext"> /// The merchello context. /// </param> public NoteApiController(IMerchelloContext merchelloContext) : base(merchelloContext) { Mandate.ParameterNotNull(merchelloContext, "merchelloContext"); _noteService = merchelloContext.Services.NoteService; _merchelloHelper = new MerchelloHelper(merchelloContext.Services); }
public NoteController(INoteService noteService, IUserService userService , ILogService logService ) : base(userService, logService) { this.serviceNote = noteService; }
public LeadController( ILeadService LeadService, IContactService contactService, IMembershipService membershipService, IRoleService roleService, INoteService noteService, IActivityService activityService, ISaleService saleService, ITaskService taskService, ViewDataHelper viewdataHelper, ICampaignService campaignService, ITagService tagService) { _leadService = LeadService; _contactService = contactService; _membershipService = membershipService; _roleService = roleService; _noteService = noteService; _activityService = activityService; _saleService = saleService; _taskService = taskService; _viewdataHelper = viewdataHelper; _campaignService = campaignService; _tagService = tagService; }
/// <summary> /// Initializes a new instance of the <see cref="InvoiceApiController"/> class. /// </summary> /// <param name="merchelloContext"> /// The merchello context. /// </param> public InvoiceApiController(IMerchelloContext merchelloContext) : base(merchelloContext) { _storeSettingService = MerchelloContext.Services.StoreSettingService as StoreSettingService; _invoiceService = merchelloContext.Services.InvoiceService; _noteService = merchelloContext.Services.NoteService; _merchello = new MerchelloHelper(merchelloContext, false); }
public PersonalNotesController( ICategoryService categoryService, INoteService noteService, IVideoService videoService) { this.categoryService = categoryService; this.noteService = noteService; this.videoService = videoService; }
/// <summary> /// Initializes a new instance of the <see cref="CopyOriginalCustomerNotesToFirstNote"/> class. /// </summary> public CopyOriginalCustomerNotesToFirstNote() : base(ApplicationContext.Current.DatabaseContext.SqlSyntax, Umbraco.Core.Logging.Logger.CreateWithDefaultLog4NetConfiguration()) { var dbContext = ApplicationContext.Current.DatabaseContext; _database = dbContext.Database; _sqlSyntax = dbContext.SqlSyntax; _noteService = MerchelloContext.Current.Services.NoteService; }
public NoteListViewModel(INoteService noteService) { this.NoteService = noteService; this.UpdateNoteListCommand = new RelayCommand(UpdateNoteList); this.DeleteNoteCommand = new RelayCommand<Note>(DeleteNote); UpdateNoteList(); Messenger.Default.Register<NewNoteMessage>(this, AddNoteHandler); Messenger.Default.Register<EditNoteMessage>(this, EditNoteHandler); }
public NoteController( INoteService NoteService, IContactService contactService, ILeadService leadService, IQuoteService quoteService, IMembershipService membershipService) { _noteService = NoteService; _contactService = contactService; _leadService = leadService; _quoteService = quoteService; _membershipService = membershipService; }
public static NoteController GetInitialisedNotesController(INoteService noteService) { var controller = new NoteController(noteService) { Request = new HttpRequestMessage {RequestUri = new Uri("http://localhost/api/")}, Configuration = new HttpConfiguration() }; controller.Configuration.MapHttpAttributeRoutes(); controller.Configuration.EnsureInitialized(); return controller; }
/// <summary> /// Creates a new instance of <c>NotesBrowserModel</c>. /// </summary> public NotesBrowserModel(IUnityContainer container) { OpenNoteCommand = new DelegateCommand<Note>(OpenNote); DeleteSelectedNoteCommand = new DelegateCommand<object>( DeleteSelectedNote, CanDeleteSelectedNote); CreateNewNoteCommand = new DelegateCommand<object>(CreateNewNote); view = new NotesBrowser(this); service = container.Resolve<INoteService>(); documentController = container.Resolve<IDocumentController>( ControllerNames.DocumentController); Notes = new ObservableCollection<Note>(); LoadAllNotes(); }
public FamilyTreeServiceFactory(IUnitOfWork unitOfWork, ICacheProvider cache) { Requires.NotNull(unitOfWork); Requires.NotNull(cache); _citationService = new CitationService(unitOfWork); _familyService = new FamilyService(unitOfWork); _individualService = new IndividualService(unitOfWork); _factService = new FactService(unitOfWork); _multimediaService = new MultimediaLinkService(unitOfWork); _noteService = new NoteService(unitOfWork); _repositoryService = new RepositoryService(unitOfWork); _sourceService = new SourceService(unitOfWork); _treeService = new TreeService(unitOfWork); }
public ContactsController( INoteService noteService, IContactService contactService, ILeadService leadService, IQuoteService quoteService, IMembershipService membershipService, IActivityService activityService, ViewDataHelper initHelper) { _noteService = noteService; _contactService = contactService; _leadService = leadService; _quoteService = quoteService; _membershipService = membershipService; _activityService = activityService; _initHelper = initHelper; }
public QuoteController( ILeadService LeadService, IContactService contactService, IMembershipService membershipService, IRoleService roleService, INoteService noteService, IActivityService activityService, IQuoteService quoteService, IInvoiceService invoiceService) { _leadService = LeadService; _contactService = contactService; _membershipService = membershipService; _roleService = roleService; _noteService = noteService; _activityService = activityService; _quoteService = quoteService; _invoiceService = invoiceService; }
public SaleController( ILeadService LeadService, IContactService contactService, IMembershipService membershipService, IRoleService roleService, INoteService noteService, IActivityService activityService, ISaleService saleService, ViewDataHelper initHelper, ITagService tagService) { _leadService = LeadService; _contactService = contactService; _membershipService = membershipService; _roleService = roleService; _noteService = noteService; _activityService = activityService; _saleService = saleService; _initHelper = initHelper; _tagService = tagService; }
public InvoiceController( ILeadService LeadService, IContactService contactService, IMembershipService membershipService, IRoleService roleService, INoteService noteService, IActivityService activityService, IInvoiceService invoiceService, ISaleService saleService, ViewDataHelper initHelper) { _leadService = LeadService; _contactService = contactService; _membershipService = membershipService; _roleService = roleService; _noteService = noteService; _activityService = activityService; _saleService = saleService; _invoiceService = invoiceService; _initHelper = initHelper; }
public NotesControllerTests() { _noteService = new TestNoteService(); _controller = new NotesController(_noteService); ((TestNoteService)_noteService).Controller = _controller; }
protected override void Dispose(bool disposing) { if (disposing) { if (_noteService != null) { _noteService.Dispose(); _noteService = null; } } base.Dispose(disposing); }
/// <summary> /// Create a controller and set the service /// </summary> public NoteController(INoteService service) { _service = service; }
/// <summary> /// Creates the DataController using Structure Map to inject the dependencies /// </summary> /// <param name="noteService">The structure map injected note service.</param> public DataController(INoteService noteService) { _noteService = noteService; }
public SettingsAdvancedViewModel(IBackupService backupService, IDialogService dialogService, INoteService noteService, IEventAggregator eventAggregator) { // Injection this.eventAggregator = eventAggregator; this.backupService = backupService; this.dialogService = dialogService; this.noteService = noteService; // Commands this.BackupCommand = new DelegateCommand(() => this.Backup()); this.ImportCommand = new DelegateCommand(() => this.Import()); this.RestoreCommand = new DelegateCommand(() => this.Restore()); this.OpenStorageLocationCommand = new DelegateCommand(() => Actions.TryOpenPath(ApplicationPaths.CurrentNoteStorageLocation)); this.ChangeStorageLocationCommand = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(false, false); }); this.MoveStorageLocationCommand = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(false, true); }); this.ResetStorageLocationCommand = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(true, false); }); // Event handlers this.noteService.StorageLocationChanged += (sender, e) => OnPropertyChanged(() => this.StorageLocation); // Initialize this.LoadNumberOfNotesInJumplist(); this.LoadCheckBoxStates(); }
public SearchController(ISearchService searchService, INoteService noteService,IVideoService videoService) { this.searchService = searchService; this.noteService = noteService; this.videoService = videoService; }
public NoteController(INoteService noteService) { this.noteService = noteService; }
public NotesListsViewModel(IEventAggregator eventAggregator, INoteService noteService, IAppearanceService appearanceService, IJumpListService jumpListService, ISearchService searchService, IDialogService dialogService, I18nService i18nService, IBackupService backupService) { // Injection this.eventAggregator = eventAggregator; this.noteService = noteService; this.appearanceService = appearanceService; this.jumpListService = jumpListService; this.searchService = searchService; this.dialogService = dialogService; this.i18nService = i18nService; this.backupService = backupService; // PubSub events this.eventAggregator.GetEvent <TriggerLoadNoteAnimationEvent>().Subscribe((_) => { this.TriggerRefreshNotesAnimation = false; this.TriggerRefreshNotesAnimation = true; }); this.eventAggregator.GetEvent <SettingChangeStorageLocationFromMainChangedEvent>().Subscribe((_) => OnPropertyChanged(() => this.ShowChangeStorageLocationButton)); this.eventAggregator.GetEvent <RefreshJumpListEvent>().Subscribe((_) => this.jumpListService.RefreshJumpListAsync(this.noteService.GetRecentlyOpenedNotes(SettingsClient.Get <int>("Advanced", "NumberOfNotesInJumpList")), this.noteService.GetFlaggedNotes())); this.eventAggregator.GetEvent <OpenNoteEvent>().Subscribe(noteTitle => { if (!string.IsNullOrEmpty(noteTitle)) { this.SelectedNote = new NoteViewModel { Title = noteTitle } } ; this.OpenSelectedNote(); }); // Event handlers this.i18nService.LanguageChanged += LanguageChangedHandler; this.noteService.FlagUpdated += async(noteId, isFlagged) => { await this.UpdateNoteFlagAsync(noteId, isFlagged); }; this.noteService.StorageLocationChanged += (_, __) => this.RefreshNotebooksAndNotes(); this.backupService.BackupRestored += (_, __) => this.RefreshNotebooksAndNotes(); this.noteService.NotesChanged += (_, __) => Application.Current.Dispatcher.Invoke(() => { this.RefreshNotes(); }); this.searchService.Searching += (_, __) => TryRefreshNotesOnSearch(); this.NoteFilter = ""; // Must be set before RefreshNotes() // Initialize notebooks this.RefreshNotebooksAndNotes(); // Commands this.DeleteNoteCommand = new DelegateCommand <object>(async(obj) => await this.DeleteNoteAsync(obj)); this.ToggleNoteFlagCommand = new DelegateCommand <object>((obj) => this.ToggleNoteFlag(obj)); this.DeleteNotebookCommand = new DelegateCommand <object>((obj) => this.DeleteNotebook(obj)); this.EditNotebookCommand = new DelegateCommand <object>((obj) => this.EditNotebook(obj)); this.DeleteSelectedNotebookCommand = new DelegateCommand(() => this.DeleteSelectedNotebook()); this.EditSelectedNotebookCommand = new DelegateCommand(() => this.EditSelectedNotebook()); this.DeleteSelectedNoteCommand = new DelegateCommand(async() => await this.DeleteSelectedNoteAync()); this.ChangeStorageLocationCommand = new DelegateCommand(async() => await this.ChangeStorageLocationAsync(false)); this.ResetStorageLocationCommand = new DelegateCommand(async() => await this.ChangeStorageLocationAsync(true)); this.NewNotebookCommand = new DelegateCommand <string>((_) => this.NewNotebook()); Common.Prism.ApplicationCommands.NewNotebookCommand.RegisterCommand(this.NewNotebookCommand); this.NewNoteCommand = new DelegateCommand <object>(param => this.NewNote(param)); Common.Prism.ApplicationCommands.NewNoteCommand.RegisterCommand(this.NewNoteCommand); this.ImportNoteCommand = new DelegateCommand <string>((_) => this.ImportNote()); Common.Prism.ApplicationCommands.ImportNoteCommand.RegisterCommand(this.ImportNoteCommand); this.NavigateBetweenNotesCommand = new DelegateCommand <object>(NavigateBetweenNotes); Common.Prism.ApplicationCommands.NavigateBetweenNotesCommand.RegisterCommand(this.NavigateBetweenNotesCommand); // Process jumplist commands this.ProcessJumplistCommands(); }
/// <summary /> public NoteTests() { _noteService = TestInitializer.Provider.GetService <INoteService>(); _databaseContext = TestInitializer.Provider.GetService <DatabaseContext>(); _noteDataFactory = TestInitializer.Provider.GetService <NoteDataFactory>(); }
private static void RunCycle(IUserService userService, IBookService bookService, INoteService noteService) { string[] input; do { Console.Write(">"); input = CommandLineParser.Parse(Console.ReadLine(), 3); switch (input[0]?.ToLower()) { case "adduser": { AddUser(userService, input[1], input[2]); break; } case "login": { Login(userService, input[1], input[2]); break; } case "userslist": { UsersList(userService); break; } case "deleteuser": { DeleteUser(userService, bookService, noteService); break; } case "addnote": { AddNote(noteService, bookService, userService, input[1], input[2]); break; } case "noteslist": { NotesList(bookService, noteService, userService, input[1]); break; } case "changenote": { ChangeNote(bookService, noteService, userService, input[1], input[2]); break; } case "deletenote": { DeleteNote(bookService, noteService, userService, input[1]); break; } case "addbook": { AddBook(bookService, userService, input[1]); break; } case "bookslist": { BooksList(bookService, userService); break; } case "changebook": { ChangeBook(bookService, userService, input[1], input[2]); break; } case "deletebook": { DeleteBook(bookService, userService, input[1]); break; } case "commands": case "help": { DisplayCommands(); break; } case "clear": { Console.Clear(); break; } case "quit": { return; } default: { Console.WriteLine("Ошибка выбора!"); break; } } }while (input[0] != "quit"); }
public NoteController(INoteService noteService, IMapper mapper) { NoteService = noteService; Mapper = mapper; }
public UsersController() { this.userService = new UserService(); this.noteService = new NoteService(); }
public NoteController(IOrganizerDbContext organizerDbContext, INoteService <INoteDto> noteService) { _organizerDbContext = organizerDbContext; _noteService = noteService; }
public NotesController(INoteService context) { _noteService = context; }
public HomeController(ILogger <HomeController> logger, INoteService noteService) { _logger = logger; _noteService = noteService; }
public SearchController(ISearchService searchService, INoteService noteService, IVideoService videoService) { this.searchService = searchService; this.noteService = noteService; this.videoService = videoService; }
public GetNotesHandler(INoteService noteService) { _noteService = noteService; }
public ExportCmd(IConsole console, INoteService noteService) { _console = console; _noteService = noteService; }
public NoteController(INoteService noteService) { _noteService = noteService; }
public NoteController(IEmployeeService employeeService, INoteService noteService) : base(employeeService) { this._noteService = noteService; this._employeeService = employeeService; }
public EditNoteViewModel(INoteService NoteService) { this.NoteService = NoteService; this.InitializeCommand = new RelayCommand<string>(Initialize); this.SaveNoteCommand = new RelayCommand<Note>(SaveNote); }
public BusinessLogicDispatcher() { service = new LocalNoteService(); }
public NotesController(INoteService noteService) { this._noteService = noteService; }
public NotesIndexModelBuilder(INoteService notesService, IUserService userService) { _notesService = notesService; _userService = userService; }
public NoteController(INoteService mockService) { _noteService = mockService; }
public EditNoteModelBuilder(INoteService notesService, IUserService userService) { _notesService = notesService; _userService = userService; }
public NoteController(INoteService noteService) { Check.If(noteService).IsNotNull(); _noteService = noteService; }
public NotesController() { ns = NinjectKernel.Kernel.Get <INoteService>(); }
public AdminController(INoteService noteService, ICategoryService categoryService) { _noteService = noteService; _categoryService = categoryService; }
public NotesController(INoteService noteService) { service = noteService; }
/// <summary> /// Initializes a new instance of the <see cref="CompanyController"/> class. /// </summary> /// <param name="loggerService">The logger service.</param> /// <param name="crmManagerService">The CRM manager service.</param> /// <param name="userService">The user service.</param> /// <param name="noteService">The note service.</param> /// <param name="commonService">The common service.</param> /// <param name="youfferMessageService">The youffer message service.</param> /// <param name="oppService">The opp service.</param> /// <param name="youfferContactService">The youffer contact service.</param> /// <param name="youfferLeadService">The youffer lead service.</param> /// <param name="youfferFeedbackService">The youffer feedback service.</param> /// <param name="mapperFactory">The Mapper Factory</param> /// <param name="youfferNoteService">The youffer note service.</param> /// <param name="youfferInterestService"> The youffer interest service </param> /// <param name="pushMessageService">The push message service</param> public CompanyController(ILoggerService loggerService, ICRMManagerService crmManagerService, IUserService userService, INoteService noteService, ICommonService commonService, IYoufferMessageService youfferMessageService, IOpportunityService oppService, IYoufferContactService youfferContactService, IYoufferLeadService youfferLeadService, IYoufferFeedbackService youfferFeedbackService, IMapperFactory mapperFactory, IYoufferNoteService youfferNoteService, IYoufferInterestService youfferInterestService, IPushMessageService pushMessageService) : base(loggerService) { this.mapperFactory = mapperFactory; this.crmManagerService = crmManagerService; this.userService = userService; this.noteService = noteService; this.commonService = commonService; this.youfferMessageService = youfferMessageService; this.oppService = oppService; this.youfferContactService = youfferContactService; this.youfferLeadService = youfferLeadService; this.youfferFeedbackService = youfferFeedbackService; this.youfferNoteService = youfferNoteService; this.youfferInterestService = youfferInterestService; this.pushMessageService = pushMessageService; }
public NoteController(INoteService noteService, IGuardService guardService) { _noteService = noteService; _guardService = guardService; }
public NotesController(INoteService _service) { this.service = _service; }
public RobotsController(INoteService note, IOptionsSnapshot <NoteSettings> settings) { _note = note; _settings = settings; }
public SettingsAppearanceViewModel(IAppearanceService appearanceService, II18nService i18nService, INoteService noteService, IEventAggregator eventAggregator) { this.appearanceService = appearanceService; this.i18nService = i18nService; this.noteService = noteService; this.eventAggregator = eventAggregator; // ColorSchemes this.GetColorSchemes(); // Languages this.GetLanguagesAsync(); // CheckBoxStates this.LoadCheckBoxStates(); // Event handling this.appearanceService.ColorSchemesChanged += ColorSchemesChangedHandler; this.i18nService.LanguagesChanged += (sender, e) => this.GetLanguagesAsync(); this.ColorSchemesDirectory = System.IO.Path.Combine(SettingsClient.ApplicationFolder(), ApplicationPaths.ColorSchemesSubDirectory); }
public Handler(INoteService noteService) { _noteService = noteService; }
public NoteController(INoteService service) : base(service) { }
public NotesController(INoteService noteService, IMapper mapper) { _noteService = noteService; _mapper = mapper; }
public NotesController(INoteService noteService, IUserService userService) { _noteService = noteService; _userService = userService; }
public HomeController(IUserService userService, INoteService noteService) { this.userService = userService; this.noteService = noteService; }