コード例 #1
0
        public MainViewModel(IFileSearchService fileSearch, UiBackgroundContext backgroundContext, FileSearchModeGetter fileSearchModeGetter, FileSearchCountGetter fileSearchCountGetter)
        {
            Ensure.NotNull(fileSearch, "fileSearch");
            Ensure.NotNull(backgroundContext, "backgroundContext");
            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;
            BackgroundContext = backgroundContext;
        }
コード例 #2
0
 public Disposable(UiBackgroundContext context)
 {
     Ensure.NotNull(context, "context");
     this.context = context;
     this.context.CurrentCount++;
 }