Exemple #1
0
        public PropertyStruct(ArkArchive archive, PropertyArgs args) : base(archive, args)
        {
            var structType = archive.GetName();
            var position   = archive.Position;

            try
            {
                _value = StructRegistry.read(archive, structType);
            }
            catch (UnreadablePropertyException)
            {
                // skip struct
                archive.Position += DataSize;
            }
        }
Exemple #2
0
        public PropertyStruct(ArkArchive archive, PropertyArgs args, bool propertyIsExcluded = false, ArkNameTree exclusivePropertyNameTree = null) : base(archive, args, propertyIsExcluded)
        {
            if (propertyIsExcluded)
            {
                archive.SkipName();
                archive.Position += DataSize;
                return;
            }

            var structType = archive.GetName();
            var position   = archive.Position;

            try
            {
                _value = StructRegistry.read(archive, structType, exclusivePropertyNameTree);
            }
            catch (UnreadablePropertyException)
            {
                // skip struct
                archive.Position += DataSize;
            }
        }