Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ------------------------------------------------------------------------------
- // <auto-generated>
- // Generated by Xsd2Code. Version 3.4.0.37595
- // <NameSpace>MalApp2</NameSpace><Collection>Array</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net40</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>False</GenerateXMLAttributes><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitializeFields>True</EnableInitializeFields>
- // </auto-generated>
- // ------------------------------------------------------------------------------
- namespace MalApp2
- {
- using System;
- using System.Diagnostics;
- using System.Xml.Serialization;
- using System.Collections;
- using System.Xml.Schema;
- using System.ComponentModel;
- using System.IO;
- using System.Text;
- public partial class myanimelist
- {
- private myanimelistMyinfo myinfoField;
- private myanimelistManga[] mangaField;
- private static System.Xml.Serialization.XmlSerializer serializer;
- public myanimelistMyinfo myinfo
- {
- get
- {
- return this.myinfoField;
- }
- set
- {
- this.myinfoField = value;
- }
- }
- public myanimelistManga[] manga
- {
- get
- {
- return this.mangaField;
- }
- set
- {
- this.mangaField = value;
- }
- }
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(myanimelist));
- }
- return serializer;
- }
- }
- #region Serialize/Deserialize
- /// <summary>
- /// Serializes current myanimelist object into an XML document
- /// </summary>
- /// <returns>string XML value</returns>
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes workflow markup into an myanimelist object
- /// </summary>
- /// <param name="xml">string workflow markup to deserialize</param>
- /// <param name="obj">Output myanimelist object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool Deserialize(string xml, out myanimelist obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelist);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool Deserialize(string xml, out myanimelist obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
- public static myanimelist Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((myanimelist)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
- /// <summary>
- /// Serializes current myanimelist object into file
- /// </summary>
- /// <param name="fileName">full path of outupt xml file</param>
- /// <param name="exception">output Exception value if failed</param>
- /// <returns>true if can serialize and save into file; otherwise, false</returns>
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes xml markup from file into an myanimelist object
- /// </summary>
- /// <param name="fileName">string xml file to load and deserialize</param>
- /// <param name="obj">Output myanimelist object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool LoadFromFile(string fileName, out myanimelist obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelist);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool LoadFromFile(string fileName, out myanimelist obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
- public static myanimelist LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
- public partial class myanimelistMyinfo
- {
- private int user_idField;
- private string user_nameField;
- private sbyte user_readingField;
- private sbyte user_completedField;
- private sbyte user_onholdField;
- private sbyte user_droppedField;
- private sbyte user_plantoreadField;
- private float user_days_spent_watchingField;
- private static System.Xml.Serialization.XmlSerializer serializer;
- public int user_id
- {
- get
- {
- return this.user_idField;
- }
- set
- {
- this.user_idField = value;
- }
- }
- public string user_name
- {
- get
- {
- return this.user_nameField;
- }
- set
- {
- this.user_nameField = value;
- }
- }
- public sbyte user_reading
- {
- get
- {
- return this.user_readingField;
- }
- set
- {
- this.user_readingField = value;
- }
- }
- public sbyte user_completed
- {
- get
- {
- return this.user_completedField;
- }
- set
- {
- this.user_completedField = value;
- }
- }
- public sbyte user_onhold
- {
- get
- {
- return this.user_onholdField;
- }
- set
- {
- this.user_onholdField = value;
- }
- }
- public sbyte user_dropped
- {
- get
- {
- return this.user_droppedField;
- }
- set
- {
- this.user_droppedField = value;
- }
- }
- public sbyte user_plantoread
- {
- get
- {
- return this.user_plantoreadField;
- }
- set
- {
- this.user_plantoreadField = value;
- }
- }
- public float user_days_spent_watching
- {
- get
- {
- return this.user_days_spent_watchingField;
- }
- set
- {
- this.user_days_spent_watchingField = value;
- }
- }
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(myanimelistMyinfo));
- }
- return serializer;
- }
- }
- #region Serialize/Deserialize
- /// <summary>
- /// Serializes current myanimelistMyinfo object into an XML document
- /// </summary>
- /// <returns>string XML value</returns>
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes workflow markup into an myanimelistMyinfo object
- /// </summary>
- /// <param name="xml">string workflow markup to deserialize</param>
- /// <param name="obj">Output myanimelistMyinfo object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool Deserialize(string xml, out myanimelistMyinfo obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelistMyinfo);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool Deserialize(string xml, out myanimelistMyinfo obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
- public static myanimelistMyinfo Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((myanimelistMyinfo)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
- /// <summary>
- /// Serializes current myanimelistMyinfo object into file
- /// </summary>
- /// <param name="fileName">full path of outupt xml file</param>
- /// <param name="exception">output Exception value if failed</param>
- /// <returns>true if can serialize and save into file; otherwise, false</returns>
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes xml markup from file into an myanimelistMyinfo object
- /// </summary>
- /// <param name="fileName">string xml file to load and deserialize</param>
- /// <param name="obj">Output myanimelistMyinfo object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool LoadFromFile(string fileName, out myanimelistMyinfo obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelistMyinfo);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool LoadFromFile(string fileName, out myanimelistMyinfo obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
- public static myanimelistMyinfo LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
- public partial class myanimelistManga
- {
- private short series_mangadb_idField;
- private string series_titleField;
- private string series_synonymsField;
- private sbyte series_typeField;
- private short series_chaptersField;
- private sbyte series_volumesField;
- private sbyte series_statusField;
- private string series_startField;
- private string series_endField;
- private string series_imageField;
- private int my_idField;
- private short my_read_chaptersField;
- private sbyte my_read_volumesField;
- private string my_start_dateField;
- private string my_finish_dateField;
- private sbyte my_scoreField;
- private sbyte my_statusField;
- private string my_rereadinggField;
- private sbyte my_rereading_chapField;
- private int my_last_updatedField;
- private string my_tagsField;
- private static System.Xml.Serialization.XmlSerializer serializer;
- public short series_mangadb_id
- {
- get
- {
- return this.series_mangadb_idField;
- }
- set
- {
- this.series_mangadb_idField = value;
- }
- }
- public string series_title
- {
- get
- {
- return this.series_titleField;
- }
- set
- {
- this.series_titleField = value;
- }
- }
- public string series_synonyms
- {
- get
- {
- return this.series_synonymsField;
- }
- set
- {
- this.series_synonymsField = value;
- }
- }
- public sbyte series_type
- {
- get
- {
- return this.series_typeField;
- }
- set
- {
- this.series_typeField = value;
- }
- }
- public short series_chapters
- {
- get
- {
- return this.series_chaptersField;
- }
- set
- {
- this.series_chaptersField = value;
- }
- }
- public sbyte series_volumes
- {
- get
- {
- return this.series_volumesField;
- }
- set
- {
- this.series_volumesField = value;
- }
- }
- public sbyte series_status
- {
- get
- {
- return this.series_statusField;
- }
- set
- {
- this.series_statusField = value;
- }
- }
- public string series_start
- {
- get
- {
- return this.series_startField;
- }
- set
- {
- this.series_startField = value;
- }
- }
- public string series_end
- {
- get
- {
- return this.series_endField;
- }
- set
- {
- this.series_endField = value;
- }
- }
- public string series_image
- {
- get
- {
- return this.series_imageField;
- }
- set
- {
- this.series_imageField = value;
- }
- }
- public int my_id
- {
- get
- {
- return this.my_idField;
- }
- set
- {
- this.my_idField = value;
- }
- }
- public short my_read_chapters
- {
- get
- {
- return this.my_read_chaptersField;
- }
- set
- {
- this.my_read_chaptersField = value;
- }
- }
- public sbyte my_read_volumes
- {
- get
- {
- return this.my_read_volumesField;
- }
- set
- {
- this.my_read_volumesField = value;
- }
- }
- public string my_start_date
- {
- get
- {
- return this.my_start_dateField;
- }
- set
- {
- this.my_start_dateField = value;
- }
- }
- public string my_finish_date
- {
- get
- {
- return this.my_finish_dateField;
- }
- set
- {
- this.my_finish_dateField = value;
- }
- }
- public sbyte my_score
- {
- get
- {
- return this.my_scoreField;
- }
- set
- {
- this.my_scoreField = value;
- }
- }
- public sbyte my_status
- {
- get
- {
- return this.my_statusField;
- }
- set
- {
- this.my_statusField = value;
- }
- }
- public string my_rereadingg
- {
- get
- {
- return this.my_rereadinggField;
- }
- set
- {
- this.my_rereadinggField = value;
- }
- }
- public sbyte my_rereading_chap
- {
- get
- {
- return this.my_rereading_chapField;
- }
- set
- {
- this.my_rereading_chapField = value;
- }
- }
- public int my_last_updated
- {
- get
- {
- return this.my_last_updatedField;
- }
- set
- {
- this.my_last_updatedField = value;
- }
- }
- public string my_tags
- {
- get
- {
- return this.my_tagsField;
- }
- set
- {
- this.my_tagsField = value;
- }
- }
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(myanimelistManga));
- }
- return serializer;
- }
- }
- #region Serialize/Deserialize
- /// <summary>
- /// Serializes current myanimelistManga object into an XML document
- /// </summary>
- /// <returns>string XML value</returns>
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes workflow markup into an myanimelistManga object
- /// </summary>
- /// <param name="xml">string workflow markup to deserialize</param>
- /// <param name="obj">Output myanimelistManga object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool Deserialize(string xml, out myanimelistManga obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelistManga);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool Deserialize(string xml, out myanimelistManga obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
- public static myanimelistManga Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((myanimelistManga)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
- /// <summary>
- /// Serializes current myanimelistManga object into file
- /// </summary>
- /// <param name="fileName">full path of outupt xml file</param>
- /// <param name="exception">output Exception value if failed</param>
- /// <returns>true if can serialize and save into file; otherwise, false</returns>
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
- /// <summary>
- /// Deserializes xml markup from file into an myanimelistManga object
- /// </summary>
- /// <param name="fileName">string xml file to load and deserialize</param>
- /// <param name="obj">Output myanimelistManga object</param>
- /// <param name="exception">output Exception value if deserialize failed</param>
- /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
- public static bool LoadFromFile(string fileName, out myanimelistManga obj, out System.Exception exception)
- {
- exception = null;
- obj = default(myanimelistManga);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
- public static bool LoadFromFile(string fileName, out myanimelistManga obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
- public static myanimelistManga LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement