예제 #1
0
            public override ExitCode Execute()
            {
                var nodeBuilder = new CacheNodeBuilder(Store, FeedCache);
                nodeBuilder.Run();

                if (AdditionalArgs.Count == 1)
                {
                    var uri = GetCanonicalUri(AdditionalArgs[0]);
                    if (uri.IsFile && !File.Exists(uri.LocalPath))
                        throw new FileNotFoundException(string.Format(Resources.FileOrDirNotFound, uri.LocalPath), uri.LocalPath);

                    var nodes = nodeBuilder.Nodes.OfType<OwnedImplementationNode>().Where(x => x.FeedUri == uri);
                    Handler.Output(Resources.CachedImplementations, nodes);
                }
                else
                {
                    var nodes = nodeBuilder.Nodes.OfType<ImplementationNode>();
                    Handler.Output(Resources.CachedImplementations, nodes);
                }

                return ExitCode.OK;
            }
예제 #2
0
        private void refreshListWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            _store.Flush();
            _feedCache.Flush();

            var nodeBuilder = new CacheNodeBuilder(_store, _feedCache);
            nodeBuilder.Run();
            e.Result = nodeBuilder;
        }