Exemplo n.º 1
0
        public InstallInfo LoadFile(string filePath)
        {
            InstallInfo install = null;

            if (File.Exists(filePath))
            {
                using (StreamReader reader = new StreamReader(File.OpenRead(filePath))) {
                    var serializer = new XmlSerializer(typeof(InstallInfo));
                    install = (InstallInfo)serializer.Deserialize(reader);
                }
            }

            return(install);
        }
Exemplo n.º 2
0
        public InstallInfo Load(string workingDirectory, string installName)
        {
            var installDir = workingDirectory
                             + Path.DirectorySeparatorChar
                             + "install";

            InstallInfo install = null;

            foreach (var dir in Directory.GetDirectories(installDir))
            {
                var name = Path.GetFileName(dir);

                if (name == installName)
                {
                    install = LoadDirectory(dir);
                    break;
                }
            }

            return(install);
        }
Exemplo n.º 3
0
        public IInstallInfo Create(string name)
        {
            var installer = new InstallInfo(name);

            return(installer);
        }