LSLib.Granny.GR2.WritableSection.WriteStructDefinition C# (CSharp) Метод

WriteStructDefinition() публичный Метод

public WriteStructDefinition ( StructDefinition defn ) : void
defn StructDefinition
Результат void
        public void WriteStructDefinition(StructDefinition defn)
        {
            Debug.Assert(Writer == MainWriter);
            GR2.ObjectOffsets[defn] = new SectionReference(Type, (UInt32)MainStream.Position);

            var tag = GR2.Header.tag;
            foreach (var member in defn.Members)
            {
                if (member.ShouldSerialize(tag))
                {
                    WriteMemberDefinition(member);
                }
            }

            var end = new MemberDefinition();
            end.Type = MemberType.None;
            end.Extra = new UInt32[] { 0, 0, 0 };
            WriteMemberDefinition(end);
        }