// Methods
 public DvdInfoAsyncResult(DvdInfo.DvdInfoRequestData requestData, object callbackData, bool completedSynchronously)
 {
     this._requestData = requestData;
     this._callbackData = callbackData;
     this._completedSynchronously = completedSynchronously;
 }
 private static bool IsValid(DvdInfo dvdInfo, bool bCheckExpiration)
 {
     if (dvdInfo == null)
     {
         return false;
     }
     if (string.IsNullOrEmpty(dvdInfo.Name))
     {
         return false;
     }
     if (bCheckExpiration && (DateTime.Now.CompareTo(dvdInfo.MdrDvd.MetadataExpires) > 0))
     {
         return false;
     }
     return true;
 }
 private void Write5_DvdInfo(string n, string ns, DvdInfo o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && (o.GetType() != typeof(DvdInfo)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("DvdInfo", "");
         }
         this.Write4_MdrDvd("MDR-DVD", "", o.MdrDvd, false);
         base.WriteElementStringRaw("NeedsAttribution", "", XmlConvert.ToString(o.NeedsAttribution));
         base.WriteElementString("DvdId", "", o.DvdId);
         base.WriteEndElement(o);
     }
 }
 private static bool IsValid(DvdInfo dvdInfo)
 {
     return IsValid(dvdInfo, false);
 }
 private DvdInfo Read5_DvdInfo(bool isNullable, bool checkType)
 {
     XmlQualifiedName type = checkType ? base.GetXsiType() : null;
     bool flag = false;
     if (isNullable)
     {
         flag = base.ReadNull();
     }
     if ((checkType && (type != null)) && ((type.Name != this.id3_DvdInfo) || (type.Namespace != this.id2_Item)))
     {
         throw base.CreateUnknownTypeException(type);
     }
     if (flag)
     {
         return null;
     }
     DvdInfo o = new DvdInfo();
     bool[] flagArray = new bool[3];
     while (base.Reader.MoveToNextAttribute())
     {
         if (!base.IsXmlnsAttribute(base.Reader.Name))
         {
             base.UnknownNode(o);
         }
     }
     base.Reader.MoveToElement();
     if (base.Reader.IsEmptyElement)
     {
         base.Reader.Skip();
         return o;
     }
     base.Reader.ReadStartElement();
     base.Reader.MoveToContent();
     int whileIterations = 0;
     int readerCount = base.ReaderCount;
     while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None))
     {
         if (base.Reader.NodeType == XmlNodeType.Element)
         {
             if ((!flagArray[0] && (base.Reader.LocalName == this.id4_MDRDVD)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.MdrDvd = this.Read4_MdrDvd(true);
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id5_NeedsAttribution)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.NeedsAttribution = XmlConvert.ToBoolean(base.Reader.ReadElementString());
                 flagArray[1] = true;
             }
             else if ((!flagArray[2] && (base.Reader.LocalName == this.id6_DvdId)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.DvdId = base.Reader.ReadElementString();
                 flagArray[2] = true;
             }
             else
             {
                 base.UnknownNode(o, ":MDR-DVD, :NeedsAttribution, :DvdId");
             }
         }
         else
         {
             base.UnknownNode(o, ":MDR-DVD, :NeedsAttribution, :DvdId");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }