diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Controller/Xml/XmlExtensions.cs | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Controller/Xml/XmlExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Xml/XmlExtensions.cs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/MediaBrowser.Controller/Xml/XmlExtensions.cs b/MediaBrowser.Controller/Xml/XmlExtensions.cs deleted file mode 100644 index d2e8e1983..000000000 --- a/MediaBrowser.Controller/Xml/XmlExtensions.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Globalization;
-using System.Xml;
-
-namespace MediaBrowser.Controller.Xml
-{
- public static class XmlExtensions
- {
- private static readonly CultureInfo _usCulture = new CultureInfo("en-US");
-
- /// <summary>
- /// Reads a float from the current element of an XmlReader
- /// </summary>
- public static float ReadFloatSafe(this XmlReader reader)
- {
- string valueString = reader.ReadElementContentAsString();
-
- float value = 0;
-
- if (!string.IsNullOrWhiteSpace(valueString))
- {
- // float.TryParse is local aware, so it can be probamatic, force us culture
- float.TryParse(valueString, NumberStyles.AllowDecimalPoint, _usCulture, out value);
- }
-
- return value;
- }
-
- /// <summary>
- /// Reads an int from the current element of an XmlReader
- /// </summary>
- public static int ReadIntSafe(this XmlReader reader)
- {
- string valueString = reader.ReadElementContentAsString();
-
- int value = 0;
-
- if (!string.IsNullOrWhiteSpace(valueString))
- {
-
- int.TryParse(valueString, out value);
- }
-
- return value;
- }
- }
-}
|
