Esempio n. 1
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="name">Name of element</param>
 /// <param name="id">ID of element</param>
 /// <param name="type">Type of element</param>
 public ContentPackElement(ContentPackElementData data, ContentPack parent)
 {
     this.Name               = data.Name;
     this.Id                 = data.Id;
     this.Type               = data.Type;
     this.Parent             = parent;
     this.targetFileZipEntry = data.targetFileZipEntry;
 }
Esempio n. 2
0
 private void ReadPackEntries(ZipArchive zipArchive, ContentPackData contentPackData)
 {
     try
     {
         foreach (ZipArchiveEntry entry in zipArchive.Entries)
         {
             if (IsEntryAnInfoFile(entry))
             {
                 ElementInfoFileReader  elementInfoFileReader  = new ElementInfoFileReader();
                 ContentPackElementData contentPackElementData = elementInfoFileReader.ReadFile(entry, zipArchive);
                 contentPackData.Elements.Enqueue(contentPackElementData);
             }
         }
     }
     catch (Exception e)
     {
         throw new Exception("Problem with reading pack entries.", e);
     }
 }