Пример #1
0
        /// <summary>
        /// Десериализует объект подключения обратно.
        /// </summary>
        public AutorizationDate StartDeserialize()
        {
            FileStream fileAutorizated = new FileStream(Path.GetFullPath(System.Environment.SpecialFolder.ApplicationData.ToString()) + @"\SaveAutorizatadeDate\AutorizationData.xml",
                                                        FileMode.Open);
            XmlReader deserialiseSetting = XmlReader.Create(fileAutorizated);

            dateAutorization = (AutorizationDate)xSerealizeDate.Deserialize(deserialiseSetting);
            return(dateAutorization);
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XmlSaveDate"/> class.
 /// </summary>
 /// <param name="autorizationDate">Приинимает параметр типа AutorizationDate.</param>
 public XmlSaveDate(AutorizationDate autorizationDate)
 {
     dateAutorization = autorizationDate;
     xSerealizeDate   = new XmlSerializer(typeof(AutorizationDate));
 }