public SnippetController(IGroupRepository grepo, ISnippetRepository snippetSnipRepo, ILanguageRepository languageRepo, IUserRepository uRepo) { _snipRepo = snippetSnipRepo; _langRepo = languageRepo; _userRepo = uRepo; _groupRepo = grepo; }
public SnippetService(IDateTime dateTime, ISnippetRepository snippetRepository, ISnippetFileRepository snippetFileRepository) { _dateTime = dateTime; _snippetRepository = snippetRepository; _snippetFileRepository = snippetFileRepository; }
public SnippetService(IDateTime dateTime, ISnippetRepository snippetRepository, IUserRepository userRepository) { _dateTime = dateTime; _snippetRepository = snippetRepository; _userRepository = userRepository; hashids = new Hashids("randomSalt", 8); }
public SnippetService(ISnippetRepository snippetRepository, ISnippetQuery snippetQuery, IPublisher publisher) { _snippetRepository = snippetRepository; _snippetQuery = snippetQuery; _publisher = publisher; }
public SnippetService(IUserRepository userRepository, ISnippetRepository snippetRepository, ILanguageRepository languageRepository, ITagRepository tagRepository, ISnippetTagRepository snippetTagRepository) { _userRepository = userRepository; _snippetRepository = snippetRepository; _languageRepository = languageRepository; _tagReposory = tagRepository; _snippetTagRepository = snippetTagRepository; }
public SnippetsViewModel() { _snippetRepository = new SnippetRepository(); _snippetService = new SnippetService(); Snippets = new ObservableCollection <Snippet>( _snippetRepository.GetAll()); _snippetService.ApplySnippets(Snippets); AddCommand = new DelegatingCommand(x => true, OnAdd); SaveCommand = new DelegatingCommand(x => true, OnSave); DeleteCommand = new DelegatingCommand(x => true, OnDelete); }
public UserService(IMapper mapper, IUserRepository userContext, IUserPasswordEncoder encoder , ISnippetRepository snippetRepository, ILanguageRepository languageRepository, ISnippetTagRepository snippetTagRepository, ITagRepository tagRepository) { _mapper = mapper; _encoder = encoder; _userRepository = userContext; _snippetRepository = snippetRepository; _languageRepository = languageRepository; _snippetRepository = snippetRepository; _snippetTagRepository = snippetTagRepository; _tagRepository = tagRepository; }
private async void InitGrid() { _repository = new SnippetRepository(); var items = await _repository.GetAllAsync(); if (items == null) { return; } snippetListView.ItemsSource = items; if (_selectedIndex != -1) { snippetListView.SelectedIndex = _selectedIndex; } }
protected async override void LoadState(Object navigationParameter, Dictionary <String, Object> pageState) { _repository = new SnippetRepository(); try { if (navigationParameter != null) { var snippetFile = navigationParameter as string; if (string.IsNullOrEmpty(snippetFile)) { throw new ArgumentException(); } // Lookup the full detail of the selected snippet: _snippet = await _repository.GetSnippetInfoAsync(snippetFile); if (_snippet == null) { throw new ArgumentException(); } // Set the WebView's source to be the html version of the snippet webView.Source = new Uri("ms-appx-web:///Snippets/" + _snippet.SnippetFile + ".html"); // Register for DataRequested events (Share contract) DataTransferManager.GetForCurrentView().DataRequested += OnDataRequested; _registeredforShare = true; // Read the plain-text version of the snippet... await GetSnippetText(); } } catch { webView.Source = new Uri("ms-appx-web:///Snippets/error.html"); } }
public SnippetCollection(ISnippetRepository repo) { _repo = repo; this.AddRange(_repo.GetAllSnippets()); }
public FlagProvider(IFlagRepository flagRepository, ISnippetRepository snippetRepository) { _flagRepository = flagRepository; _snippetRepository = snippetRepository; }
public SnippetService(ISnippetRepository snippetsRepository, IUnitOfWork unitOfWork) { this.snippetsRepository = snippetsRepository; this.unitOfWork = unitOfWork; }
public SnippetProvider(ISnippetRepository repository) { _repository = repository; }
public SnippetsController(ISnippetRepository repository) : base(repository) { }
public HomeController(ILogger <HomeController> logger, ISnippetRepository repo, ISnippetFileService service) { _logger = logger; _repo = repo; _fileService = service; }
public SnippetManager(ISnippetRepository snippetRepository) { _snippetRepository = snippetRepository; }
private readonly int voteValue = 1; // maybe give access to this in an options class that can be passed in via the constructor public VoteProvider(IVoteRepository voteRepo, ISnippetRepository snippetRepo) { _voteRepository = voteRepo; _snippetRepository = snippetRepo; }
private void Init() { _snippetRepository = new SnippetRepository(); _snippetRepository.LengthyOpStarting += (sender, args) => { ProgressRingSnippets.IsActive = true; }; _snippetRepository.LengthyOpHasEnded += (sender, args) => { ProgressRingSnippets.IsActive = false; }; }
public HomeController(ISnippetRepository snippetRepository, IWebSecurity webSecurity) { this.snippetRepo = snippetRepository; this.webSecurity = webSecurity; }
public HomeController(ISnippetRepository repo, IUserRepository urepo) { _snipRepo = repo; _userRepo = urepo; }