internal override void WriteFields(IFormWriter writer)
        {
            if (string.IsNullOrEmpty(this._EditorId) == false)
            {
                writer.WriteString((uint)FieldType.EDID, this._EditorId);
            }

            if (this._FullName.IsEmpty == false)
            {
                writer.WriteLocalizedString((uint)FieldType.FULL, this._FullName);
            }

            if (this._Description.IsEmpty == false)
            {
                writer.WriteLocalizedString((uint)FieldType.DESC, this._Description);
            }

            if (this._KeywordIds.Count == 1)
            {
                writer.WriteValueU32((uint)FieldType.MNAM, this._KeywordIds[0]);
            }

            if (this._Data != null)
            {
                writer.WriteObject((uint)FieldType.DATA, this._Data);
            }
        }
Пример #2
0
        internal override void WriteFields(IFormWriter writer)
        {
            if (this._Header != null)
            {
                writer.WriteObject((uint)Fields.HEDR, this._Header);
            }

            if (string.IsNullOrEmpty(this._Creator) == false)
            {
                writer.WriteString((uint)Fields.CNAM, this._Creator);
            }

            if (string.IsNullOrEmpty(this._Summary) == false)
            {
                writer.WriteString((uint)Fields.SNAM, this._Summary);
            }

            foreach (var master in this._Masters)
            {
                writer.WriteString((uint)Fields.MAST, master, 260);
                writer.WriteValueU64((uint)Fields.DATA, 0); // is this necessary?
            }
        }