10 [global::__DynamicallyInvokable]
13 private delegate
int HashCodeOfStringDelegate(
string s,
int sLen,
long additionalEntropy);
15 private static HashCodeOfStringDelegate hashCodeDelegate =
null;
25 [global::__DynamicallyInvokable]
30 [global::__DynamicallyInvokable]
33 [global::__DynamicallyInvokable]
42 [global::__DynamicallyInvokable]
45 [global::__DynamicallyInvokable]
55 [global::__DynamicallyInvokable]
58 [global::__DynamicallyInvokable]
70 [global::__DynamicallyInvokable]
78 [global::__DynamicallyInvokable]
80 : this(name, string.
Empty)
87 [global::__DynamicallyInvokable]
90 this.ns = ((ns ==
null) ?
string.
Empty : ns);
91 this.name = ((name ==
null) ?
string.
Empty : name);
96 [global::__DynamicallyInvokable]
101 if (hashCodeDelegate ==
null)
103 hashCodeDelegate = GetHashCodeDelegate();
105 hash = hashCodeDelegate(
Name,
Name.Length, 0
L);
112 [global::__DynamicallyInvokable]
126 [global::__DynamicallyInvokable]
127 public override bool Equals(
object other)
134 if (xmlQualifiedName !=
null)
150 [global::__DynamicallyInvokable]
157 if ((
object)a ==
null || (
object)b ==
null)
173 [global::__DynamicallyInvokable]
183 [global::__DynamicallyInvokable]
184 public static string ToString(
string name,
string ns)
186 if (ns !=
null && ns.Length != 0)
188 return ns +
":" + name;
193 [SecuritySafeCritical]
195 private static HashCodeOfStringDelegate GetHashCodeDelegate()
197 if (!IsRandomizedHashingDisabled())
205 return GetHashCodeOfString;
208 [SecuritySafeCritical]
210 private static bool IsRandomizedHashingDisabled()
213 if (!ReadBoolFromXmlRegistrySettings(Registry.CurrentUser,
"DisableRandomizedHashingOnXmlQualifiedName", ref value))
215 ReadBoolFromXmlRegistrySettings(Registry.LocalMachine,
"DisableRandomizedHashingOnXmlQualifiedName", ref value);
221 private static bool ReadBoolFromXmlRegistrySettings(RegistryKey hive,
string regValueName, ref
bool value)
225 using (
RegistryKey registryKey = hive.OpenSubKey(
"SOFTWARE\\Microsoft\\.NETFramework\\XML", writable:
false))
227 if (registryKey !=
null && registryKey.GetValueKind(regValueName) == RegistryValueKind.DWord)
229 value = ((int)registryKey.GetValue(regValueName) == 1);
240 private static int GetHashCodeOfString(
string s,
int length,
long additionalEntropy)
242 return s.GetHashCode();
245 internal void Init(
string name,
string ns)
252 internal void SetNamespace(
string ns)
257 internal void Verify()
259 XmlConvert.VerifyNCName(name);
262 XmlConvert.ToUri(ns);
266 internal void Atomize(XmlNameTable nameTable)
268 name = nameTable.Add(name);
269 ns = nameTable.Add(ns);
272 internal static XmlQualifiedName Parse(
string s, IXmlNamespaceResolver nsmgr, out
string prefix)
274 ValidateNames.ParseQNameThrow(s, out prefix, out
string localName);
275 string text = nsmgr.LookupNamespace(prefix);
278 if (prefix.Length != 0)
280 throw new XmlException(
"Xml_UnknownNs", prefix);
306 int num =
string.CompareOrdinal(a.Namespace, b.Namespace);
309 num =
string.CompareOrdinal(a.Name, b.Name);
static string ToString(string name, string ns)
Returns the string value of the T:System.Xml.XmlQualifiedName.
Discovers the attributes of a method and provides access to method metadata.
Controls the ability to access registry variables. This class cannot be inherited.
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
static bool operator !=(XmlQualifiedName a, XmlQualifiedName b)
Compares two T:System.Xml.XmlQualifiedName objects.
string Namespace
Gets a string representation of the namespace of the T:System.Xml.XmlQualifiedName.
override bool Equals(object other)
Determines whether the specified T:System.Xml.XmlQualifiedName object is equal to the current T:Syste...
XmlQualifiedName()
Initializes a new instance of the T:System.Xml.XmlQualifiedName class.
SecurityAction
Specifies the security actions that can be performed using declarative security.
string Name
Gets a string representation of the qualified name of the T:System.Xml.XmlQualifiedName.
XmlQualifiedName(string name)
Initializes a new instance of the T:System.Xml.XmlQualifiedName class with the specified name.
static bool operator==(XmlQualifiedName a, XmlQualifiedName b)
Compares two T:System.Xml.XmlQualifiedName objects.
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
XmlQualifiedName(string name, string ns)
Initializes a new instance of the T:System.Xml.XmlQualifiedName class with the specified name and nam...
Represents an XML qualified name.
static readonly XmlQualifiedName Empty
Provides an empty T:System.Xml.XmlQualifiedName.
override string ToString()
Returns the string value of the T:System.Xml.XmlQualifiedName.
Specifies that the class can be serialized.
bool IsEmpty
Gets a value indicating whether the T:System.Xml.XmlQualifiedName is empty.
Controls access to non-public types and members through the N:System.Reflection APIs....
static Delegate CreateDelegate(Type type, object target, string method)
Creates a delegate of the specified type that represents the specified instance method to invoke on t...
override int GetHashCode()
Returns the hash code for the T:System.Xml.XmlQualifiedName.