mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-06 14:22:55 +01:00
Fully async'd xml parsing process as well as added resolver and provider priorities
This commit is contained in:
parent
19a4dd83c2
commit
8f024e8199
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user