public CatalogMediaTaskViewModel GetCatalogViewModel(string path)
        {
            if (path == null)
                throw new ArgumentNullException("path");

            var target = new Uri(path);
            if (target.IsFile && !System.IO.Directory.Exists(path))
                throw new ArgumentException("path does not exist");

            var task = new CatalogMediaTask(logger, mediaFactory, spiderFactory.CreateCatalogSpider(), target, TimeSpan.Zero, 0);

            return new CatalogMediaTaskViewModel(logger, task);
        }
Esempio n. 2
0
        public CatalogMediaTaskViewModel GetCatalogViewModel(string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            var target = new Uri(path);

            if (target.IsFile && !System.IO.Directory.Exists(path))
            {
                throw new ArgumentException("path does not exist");
            }

            var task = new CatalogMediaTask(logger, mediaFactory, spiderFactory.CreateCatalogSpider(), target, TimeSpan.Zero, 0);

            return(new CatalogMediaTaskViewModel(logger, task));
        }
 private static string GetDescription(CatalogMediaTask task)
 {
     return(string.Format("Catalog: {0}", GetName(task)));
 }
 private static string GetName(CatalogMediaTask task)
 {
     return(new System.IO.FileInfo(task.Target.LocalPath).FullName);
 }
 public CatalogMediaTaskViewModel(ILogger logger, CatalogMediaTask task)
     : base(logger, task, GetName(task), GetDescription(task), "pack://application:,,,/Images/pyramid_black2.jpg")
 {
 }
 private static string GetDescription(CatalogMediaTask task)
 {
     return string.Format("Catalog: {0}", GetName(task));
 }
 private static string GetName(CatalogMediaTask task)
 {
     return new System.IO.FileInfo(task.Target.LocalPath).FullName;
 }
 public CatalogMediaTaskViewModel(ILogger logger, CatalogMediaTask task)
     : base(logger, task, GetName(task), GetDescription(task), "pack://application:,,,/Images/pyramid_black2.jpg")
 {
 }