Ejemplo n.º 1
0
        public static Installer FromExisting(string path)
        {
            IvyModule package = IvyParser.ParseFile <IvyModule>(path);

            if (package == null)
            {
                return(null);
            }
            string g = Path.GetFileName(path).Substring("task-installer-".Length);

            return(new Installer(package, new Guid(g)));
        }
Ejemplo n.º 2
0
        private static InternalPackageInfo Parse(string moduleFile)
        {
            if (moduleFile == null)
            {
                return(null);
            }
            IvyModule ivyModule = IvyParser.ParseFile <IvyModule>(moduleFile);

            if (IvyParser.HasErrors)
            {
                Console.WriteLine("Error parsing module description from {0}. {1}", moduleFile, IvyParser.ErrorMessage);
                return(null);
            }
            return(new InternalPackageInfo
            {
                module = ivyModule,
                package = ivyModule.ToPackageInfo()
            });
        }