0

私有地と公有地があるところで問題が発生しています。これは、クラスとプロパティを装飾した方法です。

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;
using System.Xml.Serialization;

    [DataContract]
    [KnownType(typeof(XDocument))]
    public abstract class DocumentBase
    {
        #region Public Contructors

        /// <summary>
        /// Initialises a new instance of the DocumentBase class
        /// </summary>
        protected DocumentBase()
        {
            Id = Guid.NewGuid();
            Roles = new List<string>();
        }

        #endregion

        #region Private Fields

        /// <summary>
        /// Holds the filename of the document
        /// </summary>
        [DataMember]
        private string fileName;

        private IFileNameCleaner fileNameCleaner;

        #endregion

        #region Protected Properties

        protected IFileNameCleaner FileNameCleaner
        {
            get
            {
                return fileNameCleaner;
            }

            set
            {
                fileNameCleaner = value;
            }
        }

        #endregion

        #region Public Properties

        [DataMember]
        public string FileName
        {
            get
            {
                string newFileName = this.fileName;
                if (FileNamePrefix > 0)
                {
                    newFileName = FileNamePrefix + "_" + fileName;
                }

                return fileNameCleaner.FileName(newFileName);
            }
          private  set
            {
                fileName = value;
            }
        }

エラー:

FileName がシリアライズされていません。何が見落とされているか教えてもらえますか?

4

1 に答える 1