diff options
Diffstat (limited to 'Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs')
| -rw-r--r-- | Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs b/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs new file mode 100644 index 000000000..806290cf4 --- /dev/null +++ b/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs @@ -0,0 +1,22 @@ +using System.Xml; +using MediaBrowser.Model.Xml; + +namespace Emby.Common.Implementations.Xml +{ + public class XmlReaderSettingsFactory : IXmlReaderSettingsFactory + { + public XmlReaderSettings Create(bool enableValidation) + { + var settings = new XmlReaderSettings(); + + if (!enableValidation) + { +#if NET46 + settings.ValidationType = ValidationType.None; +#endif + } + + return settings; + } + } +} |
