aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Xml/XmlExtensions.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 11:55:05 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 11:55:05 -0400
commit8f024e81996b14a9e6a440a601d0f6c0694f7ab8 (patch)
treeb7bb10bde396608e11c0bac9c4ed706508f1a003 /MediaBrowser.Controller/Xml/XmlExtensions.cs
parent19a4dd83c21db931edf14a0ef547219ef93cdc84 (diff)
Fully async'd xml parsing process as well as added resolver and provider priorities
Diffstat (limited to 'MediaBrowser.Controller/Xml/XmlExtensions.cs')
-rw-r--r--MediaBrowser.Controller/Xml/XmlExtensions.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/MediaBrowser.Controller/Xml/XmlExtensions.cs b/MediaBrowser.Controller/Xml/XmlExtensions.cs
index 6b74a2820..3e7ae7a17 100644
--- a/MediaBrowser.Controller/Xml/XmlExtensions.cs
+++ b/MediaBrowser.Controller/Xml/XmlExtensions.cs
@@ -1,4 +1,5 @@
using System.Globalization;
+using System.Threading.Tasks;
using System.Xml;
namespace MediaBrowser.Controller.Xml
@@ -10,9 +11,9 @@ namespace MediaBrowser.Controller.Xml
/// <summary>
/// Reads a float from the current element of an XmlReader
/// </summary>
- public static float ReadFloatSafe(this XmlReader reader)
+ public static async Task<float> ReadFloatSafe(this XmlReader reader)
{
- string valueString = reader.ReadElementContentAsString();
+ string valueString = await reader.ReadElementContentAsStringAsync();
float value = 0;
@@ -28,9 +29,9 @@ namespace MediaBrowser.Controller.Xml
/// <summary>
/// Reads an int from the current element of an XmlReader
/// </summary>
- public static int ReadIntSafe(this XmlReader reader)
+ public static async Task<int> ReadIntSafe(this XmlReader reader)
{
- string valueString = reader.ReadElementContentAsString();
+ string valueString = await reader.ReadElementContentAsStringAsync();
int value = 0;
@@ -42,13 +43,5 @@ namespace MediaBrowser.Controller.Xml
return value;
}
-
- /// <summary>
- /// Reads an int from the current element of an XmlReader
- /// </summary>
- public static string ReadString(this XmlReader reader)
- {
- return reader.ReadElementContentAsString();
- }
}
}