public void Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(OpenXmlBorderPropertiesModel.GetDeclaration());
            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.Color:
                    writer.Write(this.Color);
                    break;

                case MemberName.Width:
                    writer.Write(this._widthInEighthPoints);
                    break;

                case MemberName.Style:
                    writer.Write((byte)this.Style);
                    break;

                default:
                    WordOpenXmlUtils.FailSerializable();
                    break;
                }
            }
        }
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(OpenXmlBorderPropertiesModel.GetDeclaration());
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Color:
                    this.Color = reader.ReadString();
                    break;

                case MemberName.Width:
                    this._widthInEighthPoints = reader.ReadInt32();
                    break;

                case MemberName.Style:
                    this.Style = (BorderStyle)reader.ReadByte();
                    break;

                default:
                    WordOpenXmlUtils.FailSerializable();
                    break;
                }
            }
        }
        private static List <Declaration> BuildDeclarations()
        {
            List <Declaration> list = new List <Declaration>(6);

            list.Add(BaseInterleaver.GetDeclaration());
            list.Add(OpenXmlTableGridModel.GetDeclaration());
            list.Add(OpenXmlTableRowPropertiesModel.GetDeclaration());
            list.Add(OpenXmlBorderPropertiesModel.GetDeclaration());
            list.Add(HeaderFooterReferences.GetDeclaration());
            return(list);
        }