public PinnedForEmptyPatternFileSearchService(IFileSearchService innerService, IPinStateService pinStateService)
 {
     Ensure.NotNull(innerService, "innerService");
     Ensure.NotNull(pinStateService, "pinStateService");
     this.innerService    = innerService;
     this.pinStateService = pinStateService;
 }
Beispiel #2
0
 public DelayedFileSearchService(Dispatcher dispatcher, IFileSearchService innerService)
 {
     Ensure.NotNull(dispatcher, "dispatcher");
     Ensure.NotNull(innerService, "innerService");
     this.dispatcher   = new DispatcherHelper(dispatcher);
     this.innerService = innerService;
 }
 public PinnedForEmptyPatternFileSearchService(IFileSearchService innerService, IPinStateService pinStateService)
 {
     Ensure.NotNull(innerService, "innerService");
     Ensure.NotNull(pinStateService, "pinStateService");
     this.innerService = innerService;
     this.pinStateService = pinStateService;
 }
 public DelayedFileSearchService(Dispatcher dispatcher, IFileSearchService innerService)
 {
     Ensure.NotNull(dispatcher, "dispatcher");
     Ensure.NotNull(innerService, "innerService");
     this.dispatcher = new DispatcherHelper(dispatcher);
     this.innerService = innerService;
 }
 public void SetUp()
 {
     _searchServiceStub = MockRepository.GenerateStub <IFileSearchService> ();
     _loaderMock        = MockRepository.GenerateMock <IAssemblyLoader> ();
     _assembly1         = typeof(object).Assembly;
     _assembly2         = typeof(FilePatternRootAssemblyFinder).Assembly;
     _assembly3         = typeof(FilePatternRootAssemblyFinderTest).Assembly;
 }
        public MainViewModel(IFileSearchService fileSearch, FileSearchModeGetter fileSearchModeGetter, FileSearchCountGetter fileSearchCountGetter)
        {
            Ensure.NotNull(fileSearch, "fileSearch");
            Ensure.NotNull(fileSearchModeGetter, "fileSearchModeGetter");
            Ensure.NotNull(fileSearchCountGetter, "fileSearchCountGetter");
            this.fileSearch            = fileSearch;
            this.fileSearchModeGetter  = fileSearchModeGetter;
            this.fileSearchCountGetter = fileSearchCountGetter;

            applications = new ObservableCollection <ApplicationViewModel>();
            files        = new ObservableCollection <FileViewModel>();

            IsLoading = true;
        }
        public FilePatternRootAssemblyFinder(
            string searchPath,
            IEnumerable <FilePatternSpecification> specifications,
            IFileSearchService fileSearchService,
            IAssemblyLoader assemblyLoader)
        {
            ArgumentUtility.CheckNotNullOrEmpty("searchPath", searchPath);
            ArgumentUtility.CheckNotNull("specifications", specifications);
            ArgumentUtility.CheckNotNull("fileSearchService", fileSearchService);
            ArgumentUtility.CheckNotNull("assemblyLoader", assemblyLoader);

            _searchPath        = searchPath;
            _specifications    = specifications.ToList().AsReadOnly();
            _fileSearchService = fileSearchService;
            _assemblyLoader    = assemblyLoader;
        }
Beispiel #8
0
        public Form1(IFileSearchService fileSearchService)
        {
            InitializeComponent();

            this.fileSearchService = fileSearchService;
            gridObjects            = new List <SearchResult>();

            if (File.Exists("Resources/if_search_b_44994.ico"))
            {
                Icon = new Icon("Resources/if_search_b_44994.ico");
            }

            //Display program version in the title
            Version version = Assembly.GetExecutingAssembly().GetName().Version;

            Text = $"{Text} {version.Major}.{version.Minor}";

            formatsTxt.Text    = defaultFormats;
            this.ActiveControl = searchTxt;
        }