#pragma warning restore 67 public ResetSettings( IStoredSettingsRepository settingsRepository, IUserPreferencesModelRepository userPreferencesModelRepository) { _settingsRepository = settingsRepository; _userPreferencesModelRepository = userPreferencesModelRepository; }
public ViewModelService InitializeViewModelService( IAboutPanelService aboutPanelService = null, IDialoguePageCommands dialoguePageCommands = null, IDocumentMetadataManager documentMetadataManager = null, IOptionsLists optionsLists = null, IOptionsPageControlFactory optionsPageControlFactory = null, ISolutionEventsService solutionEventsService = null, IToolWindowCommands toolWindowCommands = null, IUserPreferences userPreferences = null, IUserPreferencesModelFactory userPreferencesModelFactory = null, IUserPreferencesModelRepository userPreferencesModelRepository = null) { var repository = new MockRepository(MockBehavior.Loose) { DefaultValue = DefaultValue.Mock }; var service = new ViewModelService( aboutPanelService ?? Mock.Of <IAboutPanelService>(), dialoguePageCommands ?? Mock.Of <IDialoguePageCommands>(), documentMetadataManager ?? Mock.Of <IDocumentMetadataManager>(), optionsLists ?? repository.OneOf <IOptionsLists>(), optionsPageControlFactory ?? repository.OneOf <IOptionsPageControlFactory>(), solutionEventsService ?? Mock.Of <ISolutionEventsService>(), toolWindowCommands ?? Mock.Of <IToolWindowCommands>(), userPreferences ?? Mock.Of <IUserPreferences>(), userPreferencesModelFactory ?? Mock.Of <IUserPreferencesModelFactory>(), userPreferencesModelRepository ?? Mock.Of <IUserPreferencesModelRepository>()); return(service); }
public UserPreferences( IStoredSettingsRepository storedSettingsRepository, IList <ISortOption> sortOptions, IUserPreferencesModelRepository userPreferencesModelRepository) { _initializing = true; _storedSettingsRepository = storedSettingsRepository; _sortOptions = sortOptions; userPreferencesModelRepository.LoadInto(this); _initializing = false; }
public ViewModelService( IAboutPanelService aboutPanelService, IDialoguePageCommands dialoguePageCommands, IDocumentMetadataManager documentMetadataManager, IOptionsLists optionsLists, IOptionsPageControlFactory optionsPageControlFactory, ISolutionEventsService solutionEventsService, IToolWindowCommands toolWindowCommands, IUserPreferences userPreferences, IUserPreferencesModelFactory userPreferencesModelFactory, IUserPreferencesModelRepository userPreferencesModelRepository) { AboutPanelService = aboutPanelService; DialoguePageCommands = dialoguePageCommands; DocumentMetadataManager = documentMetadataManager; OptionsLists = optionsLists; OptionsPageControlFactory = optionsPageControlFactory; SolutionEventsService = solutionEventsService; ToolWindowCommands = toolWindowCommands; UserPreferences = userPreferences; UserPreferencesModelFactory = userPreferencesModelFactory; UserPreferencesModelRepository = userPreferencesModelRepository; }