536cd135cc
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
30 lines
997 B
C#
30 lines
997 B
C#
//------------------------------------------------------------------------------
|
|
// <copyright file="XmlNullResolver.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
// <owner current="true" primary="true">Microsoft</owner>
|
|
//------------------------------------------------------------------------------
|
|
|
|
#if !SILVERLIGHT
|
|
using System.Net;
|
|
#endif
|
|
|
|
namespace System.Xml {
|
|
internal class XmlNullResolver : XmlResolver {
|
|
public static readonly XmlNullResolver Singleton = new XmlNullResolver();
|
|
|
|
// Private constructor ensures existing only one instance of XmlNullResolver
|
|
private XmlNullResolver() { }
|
|
|
|
public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) {
|
|
throw new XmlException(Res.Xml_NullResolver, string.Empty);
|
|
}
|
|
|
|
#if !SILVERLIGHT
|
|
public override ICredentials Credentials {
|
|
set { /* Do nothing */ }
|
|
}
|
|
#endif
|
|
}
|
|
}
|