-using System;\r
+/* DVD.cs $\r
+ \r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
using System.Collections.Generic;\r
-using System.Text;\r
using System.IO;\r
-using System.Text.RegularExpressions;\r
-using System.Windows.Forms;\r
\r
namespace Handbrake.Parsing\r
{\r
/// </summary>\r
public class DVD\r
{\r
- private List<Title> m_titles;\r
+ private readonly List<Title> m_titles;\r
+\r
/// <summary>\r
- /// Collection of Titles associated with this DVD\r
+ /// Default constructor for this object\r
/// </summary>\r
- public List<Title> Titles\r
+ public DVD()\r
{\r
- get\r
- {\r
- return this.m_titles;\r
- }\r
+ m_titles = new List<Title>();\r
}\r
\r
/// <summary>\r
- /// Default constructor for this object\r
+ /// Collection of Titles associated with this DVD\r
/// </summary>\r
- public DVD()\r
+ public List<Title> Titles\r
{\r
- this.m_titles = new List<Title>();\r
+ get { return m_titles; }\r
}\r
\r
public static DVD Parse(StreamReader output)\r
{\r
- DVD thisDVD = new DVD();\r
+ var thisDVD = new DVD();\r
+\r
while (!output.EndOfStream)\r
{\r
- if ((char)output.Peek() == '+')\r
- {\r
+ if ((char) output.Peek() == '+')\r
thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));\r
- }\r
else\r
- {\r
output.ReadLine();\r
- }\r
}\r
+\r
return thisDVD;\r
}\r
}\r
-}\r
+}
\ No newline at end of file