示例#1
0
 public LibraryOperations(ITagCache tagCache, IPathsCache pathsCache, IBinariesCache binariesCache, IBinaryDataCache dataCache, IFileValidator fileValidator)
 {
     _tagCache      = tagCache;
     _pathsCache    = pathsCache;
     _binariesCache = binariesCache;
     _dataCache     = dataCache;
     _fileValidator = fileValidator;
 }
示例#2
0
        public LibraryView(ITagCache tags, IPathsCache paths, IBinariesCache binaries, Dispatcher dispatcher, ILibraryOperations libraryOps, IErrorHandler errorHandler, IFileValidator fileValidator, IEventAggregator eventAggregator)
        {
            _tags            = tags;
            _paths           = paths;
            _binariesCache   = binaries;
            _dispatcher      = dispatcher;
            _eventAggregator = eventAggregator;
            _sourceNodes     = new ObservableCollection <LibraryViewNode>();
            _nodeViewer      = new PropertyOrderedObservableCollectionViewer <LibraryViewNode>(_dispatcher);
            _nodeViewer.SetMediator(this);
            _nodeViewer.Attach(_sourceNodes);
            _nodeViewer.OrderBy(f => f.Name, new [] { "Name" }, false);

            _eventAggregator.AddListener(this, _dispatcher);
            LoadedBinariesCache = new LoadedBinaryCache(100, binaries);

            Operations = new LibraryContentOperations(libraryOps, this, errorHandler, fileValidator, _dispatcher, _eventAggregator);

            _dispatcher.BeginInvoke(new Action(PerformLoad));
        }
示例#3
0
 public ClaimInterFace(LoadedBinaryCache cache, IBinariesCache binaries, int maxBinariesToLoad)
 {
     _cache             = cache;
     _binaries          = binaries;
     _maxBinariesToLoad = maxBinariesToLoad;
 }
示例#4
0
 public LoadedBinaryCache(int maxBinariesToLoad, IBinariesCache binaries)
 {
     _claimInterface = new ClaimInterFace(this, binaries, maxBinariesToLoad);
 }