コード例 #1
0
        /// <summary>
        /// The get object data.
        /// </summary>
        /// <param name="xmlFilePath">
        /// The xml file path.
        /// </param>
        /// <returns>
        /// The <see cref="TXmlObj"/> .
        /// </returns>
        protected virtual TXmlObj GetObjectData(string xmlFilePath)
        {
            TXmlObj xmlObj;
            var     serializer = XmlSerializationHelper.GetSerializer(typeof(TXmlObj));

            using (var fs = new FileStream(xmlFilePath, FileMode.Open, FileAccess.Read))
            {
                xmlObj = (TXmlObj)serializer.Deserialize(fs);
            }

            return(xmlObj);
        }