Пример #1
0
        public static APackageTarget CreateFromBinary(MutagenFrame frame)
        {
            APackageTarget target = ((APackageTarget.Type)frame.ReadUInt32()) switch
            {
                APackageTarget.Type.SpecificReference => new PackageTargetSpecificReference()
                {
                    Reference = FormKeyBinaryTranslation.Instance.Parse(frame)
                },
                APackageTarget.Type.ObjectID => new PackageTargetObjectID()
                {
                    Reference = FormKeyBinaryTranslation.Instance.Parse(frame)
                },
                APackageTarget.Type.ObjectType => new PackageTargetObjectType()
                {
                    Type = (TargetObjectType)frame.ReadInt32()
                },
                APackageTarget.Type.LinkedReference => new PackageTargetReference()
                {
                    Reference = FormKeyBinaryTranslation.Instance.Parse(frame)
                },
                APackageTarget.Type.RefAlias => new PackageTargetAlias()
                {
                    Alias = frame.ReadInt32()
                },
                APackageTarget.Type.Unknown => new PackageTargetUnknown()
                {
                    Data = frame.ReadInt32()
                },
                APackageTarget.Type.Self => new PackageTargetSelf()
                {
                    Data = frame.ReadInt32()
                },
                _ => throw new NotImplementedException(),
            };

            target.CountOrDistance = frame.ReadInt32();
            return(target);
        }
Пример #2
0
 public PackageDataTarget(APackageTarget target)
 {
     Target = target;
 }
Пример #3
0
 partial void CustomCtor()
 {
     Target = new PackageTargetObjectType();
 }