ReadProp() публичный статический Метод

public static ReadProp ( IMEPackage pcc, byte raw, int start ) : List
pcc IMEPackage
raw byte
start int
Результат List
        private static SequenceObjectInfo generateSequenceObjectInfo(int i, ME3Package pcc)
        {
            SequenceObjectInfo info = new SequenceObjectInfo();

            PropertyReader.Property inputLinks = PropertyReader.getPropOrNull(pcc.Exports[i + 1], "InputLinks");
            if (inputLinks != null)
            {
                int    pos    = 28;
                byte[] global = inputLinks.raw;
                int    count  = BitConverter.ToInt32(global, 24);
                for (int j = 0; j < count; j++)
                {
                    List <PropertyReader.Property> p2 = PropertyReader.ReadProp(pcc, global, pos);

                    info.inputLinks.Add(p2[0].Value.StringValue);
                    for (int k = 0; k < p2.Count(); k++)
                    {
                        pos += p2[k].raw.Length;
                    }
                }
            }
            return(info);
        }
 public static byte[] getDefaultClassValue(ME3Package pcc, string className, bool fullProps = false)
 {
     if (Structs.ContainsKey(className))
     {
         bool      immutable = UnrealObjectInfo.isImmutable(className, MEGame.ME3);
         ClassInfo info      = Structs[className];
         try
         {
             string filepath = (Path.Combine(ME3Directory.gamePath, @"BIOGame\" + info.pccPath));
             if (File.Exists(info.pccPath))
             {
                 filepath = info.pccPath; //Used for dynamic lookup
             }
             using (ME3Package importPCC = MEPackageHandler.OpenME3Package(filepath))
             {
                 byte[] buff;
                 //Plane and CoverReference inherit from other structs, meaning they don't have default values (who knows why)
                 //thus, I have hardcoded what those default values should be
                 if (className == "Plane")
                 {
                     buff = PlaneDefault;
                 }
                 else if (className == "CoverReference")
                 {
                     buff = CoverReferenceDefault;
                 }
                 else
                 {
                     buff = importPCC.Exports[info.exportIndex].Data.Skip(0x24).ToArray();
                 }
                 List <PropertyReader.Property> Props = PropertyReader.ReadProp(importPCC, buff, 0);
                 MemoryStream m = new MemoryStream();
                 foreach (PropertyReader.Property p in Props)
                 {
                     string propName = importPCC.getNameEntry(p.Name);
                     //check if property is transient, if so, skip (neither of the structs that inherit have transient props)
                     if (info.properties.ContainsKey(propName) || propName == "None" || info.baseClass != "Class")
                     {
                         if (immutable && !fullProps)
                         {
                             PropertyReader.ImportImmutableProperty(pcc, importPCC, p, className, m, true);
                         }
                         else
                         {
                             PropertyReader.ImportProperty(pcc, importPCC, p, className, m, true);
                         }
                     }
                 }
                 return(m.ToArray());
             }
         }
         catch (Exception)
         {
             return(null);
         }
     }
     else if (Classes.ContainsKey(className))
     {
         ClassInfo info = Structs[className];
         try
         {
             string filepath = (Path.Combine(ME3Directory.gamePath, @"BIOGame\" + info.pccPath));
             if (File.Exists(info.pccPath))
             {
                 filepath = info.pccPath; //Used for dynamic lookup
             }
             using (ME3Package importPCC = MEPackageHandler.OpenME3Package(filepath))
             {
                 IExportEntry entry = pcc.Exports[info.exportIndex + 1];
                 List <PropertyReader.Property> Props = PropertyReader.getPropList(entry);
                 MemoryStream m = new MemoryStream(entry.DataSize - 4);
                 foreach (PropertyReader.Property p in Props)
                 {
                     if (!info.properties.ContainsKey(importPCC.getNameEntry(p.Name)))
                     {
                         //property is transient
                         continue;
                     }
                     PropertyReader.ImportProperty(pcc, importPCC, p, className, m);
                 }
                 return(m.ToArray());
             }
         }
         catch (Exception)
         {
             return(null);
         }
     }
     return(null);
 }