2016-10-25 19:53:47 -07:00
|
|
|
|
using System.Xml;
|
|
|
|
|
using MediaBrowser.Model.Xml;
|
|
|
|
|
|
2016-11-03 15:34:16 -07:00
|
|
|
|
namespace Emby.Common.Implementations.Xml
|
2016-10-25 19:53:47 -07:00
|
|
|
|
{
|
|
|
|
|
public class XmlReaderSettingsFactory : IXmlReaderSettingsFactory
|
|
|
|
|
{
|
|
|
|
|
public XmlReaderSettings Create(bool enableValidation)
|
|
|
|
|
{
|
|
|
|
|
var settings = new XmlReaderSettings();
|
|
|
|
|
|
|
|
|
|
if (!enableValidation)
|
|
|
|
|
{
|
2016-11-03 15:34:16 -07:00
|
|
|
|
#if NET46
|
2016-10-25 19:53:47 -07:00
|
|
|
|
settings.ValidationType = ValidationType.None;
|
2016-11-03 15:34:16 -07:00
|
|
|
|
#endif
|
2016-10-25 19:53:47 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return settings;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|