aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs
blob: 806290cf443be33a8b5cff92e9e969eacaa35038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
        }
    }
}