예제 #1
0
        private PackageFileList LoadPackageFileList(Stream fileListStream)
        {
            PackageFileList fileList = new PackageFileList();

            using (XmlReader reader = XmlReader.Create(fileListStream)) {
                while (reader.Read())
                {
                    if (reader.IsStartElement())
                    {
                        switch (reader.Name)
                        {
                        case "File": {
                            PackageFileListItem item = new PackageFileListItem(this.packageListDirectory, reader.ReadString().TrimStart('\\'));
                            fileList.Add(item);
                        }
                        break;
                        }
                    }
                }
            }
            return(fileList);
        }
예제 #2
0
 private PackageFileList LoadPackageFileList(Stream fileListStream)
 {
     PackageFileList fileList = new PackageFileList();
     using (XmlReader reader = XmlReader.Create(fileListStream)) {
         while (reader.Read()) {
             if (reader.IsStartElement()) {
                 switch (reader.Name) {
                     case "File": {
                             PackageFileListItem item = new PackageFileListItem(this.packageListDirectory, reader.ReadString().TrimStart('\\'));
                             fileList.Add(item);
                         }
                         break;
                 }
             }
         }
     }
     return fileList;
 }