mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-17 15:53:42 +01:00
Add ReadNormalizedString to XmlReaderExtensions
This commit is contained in:
@@ -14,6 +14,18 @@ namespace MediaBrowser.Controller.Extensions;
|
||||
/// </summary>
|
||||
public static class XmlReaderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Reads a trimmed string from the current node.
|
||||
/// </summary>
|
||||
/// <param name="reader">The <see cref="XmlReader"/>.</param>
|
||||
/// <returns>The trimmed content.</returns>
|
||||
public static string ReadNormalizedString(this XmlReader reader)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(reader);
|
||||
|
||||
return reader.ReadElementContentAsString().Trim();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a <see cref="DateTime"/> from the current node.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user