2 instantiations of XNamespace
System.Xml.Linq (2)
System\Xml\Linq\XLinq.cs (2)
454
refNamespace = namespaces.Add(new WeakReference(new
XNamespace
(namespaceName.Substring(index, count))));
508
Interlocked.CompareExchange(ref refNmsp, new WeakReference(new
XNamespace
(namespaceName)), refOld);
167 references to XNamespace
System.Activities (18)
Microsoft\VisualBasic\Activities\VisualBasicImportReference.cs (1)
74
internal
XNamespace
Xmlns
Microsoft\VisualBasic\Activities\XamlIntegration\VisualBasicExpressionConverter.cs (13)
127
XNamespace
xmlns =
XNamespace
.Get(prefix.Namespace);
188
static Dictionary<
XNamespace
, XmlnsMapping> xmlnsMappings;
190
public static Dictionary<
XNamespace
, XmlnsMapping> XmlnsMappings
229
new Dictionary<
XNamespace
, XmlnsMapping>(new XNamespaceEqualityComparer()),
282
XNamespace
xmlns =
XNamespace
.Get(attributes[i].XmlNamespace);
304
class XNamespaceEqualityComparer : IEqualityComparer<
XNamespace
>
309
bool IEqualityComparer<
XNamespace
>.Equals(
XNamespace
x,
XNamespace
y)
314
int IEqualityComparer<
XNamespace
>.GetHashCode(
XNamespace
x)
System\Activities\Statements\CompensationExtension.cs (2)
17
static readonly
XNamespace
compensationNamespace =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities/4.0/compensation");
System\Activities\Statements\DurableTimerExtension.cs (2)
26
static readonly XName timerTableName =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities/4.0/properties").GetName("RegisteredTimers");
27
static readonly XName timerExpirationTimeName =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities/4.0/properties").GetName("TimerExpirationTime");
System.Activities.DurableInstancing (4)
System\Activities\DurableInstancing\SqlWorkflowInstanceStoreConstants.cs (4)
15
public static readonly
XNamespace
WorkflowNamespace =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities/4.0/properties");
16
public static readonly
XNamespace
DurableInstancingNamespace =
XNamespace
.Get("urn:schemas-microsoft-com:System.ServiceModel.Activities.DurableInstancing/SqlWorkflowInstanceStore");
System.Data.Services.Client (4)
System\Data\Services\Client\DataServiceContext.cs (3)
3343
XElement complexProperty = new XElement(((
XNamespace
)this.DataNamespace) + property.PropertyName);
3348
complexProperty.Add(new XAttribute(((
XNamespace
)XmlConstants.DataWebMetadataNamespace) + XmlConstants.AtomTypeAttributeName, typeName));
3354
complexProperty.Add(new XAttribute(((
XNamespace
)XmlConstants.DataWebMetadataNamespace) + XmlConstants.AtomNullAttributeName, XmlConstants.XmlTrueLiteral));
System\Data\Services\Client\MaterializeFromAtom.cs (1)
510
XElement countNode = element.Descendants(
XNamespace
.Get(XmlConstants.DataWebMetadataNamespace) + XmlConstants.RowCountElement).FirstOrDefault();
System.Data.Services.Design (9)
System\Data\EntityModel\EntityClassGenerator.cs (7)
467
XNamespace
metadataNs = XmlConstants.DataWebMetadataNamespace;
504
XNamespace
oldNamespace =
XNamespace
.Get(oldNamespaceName);
505
XNamespace
newNamespace =
XNamespace
.Get(newNamespaceName);
544
e.Add(new XAttribute(
XNamespace
.Get(XmlConstants.EdmV1dot2Namespace) + attribute.Name.LocalName, attribute.Value));
615
return attribute.Name.LocalName == XmlConstants.DataWebOpenTypeAttributeName && attribute.Name.Namespace ==
XNamespace
.None;
System\Data\Services\Design\Xml\XNodeSchemaApplier.cs (2)
59
XNamespace
xsi =
XNamespace
.Get("http://www.w3.org/2001/XMLSchema-instance");
System.Runtime.DurableInstancing (25)
System\Runtime\DurableInstancing\InstancePersistence.cs (6)
15
static readonly
XNamespace
activitiesCommandNamespace =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities.Persistence/command");
16
static readonly
XNamespace
activitiesEventNamespace =
XNamespace
.Get("urn:schemas-microsoft-com:System.Activities.Persistence/event");
18
internal static
XNamespace
ActivitiesCommandNamespace
26
internal static
XNamespace
ActivitiesEventNamespace
System\Runtime\PersistenceMetadataNamespace.cs (4)
13
static readonly
XNamespace
persistenceMetadataNamespace =
XNamespace
.Get(baseNamespace);
47
static readonly
XNamespace
activationNamespace =
XNamespace
.Get(baseNamespace);
System\Runtime\Workflow45Namespace.cs (2)
13
static readonly
XNamespace
workflow45Namespace =
XNamespace
.Get(baseNamespace);
System\Runtime\WorkflowNamespace.cs (8)
13
static readonly
XNamespace
workflowNamespace =
XNamespace
.Get(baseNamespace);
14
static readonly
XNamespace
variablesNamespace =
XNamespace
.Get(baseNamespace + "/variables");
15
static readonly
XNamespace
outputNamespace =
XNamespace
.Get(baseNamespace + "/output");
25
public static
XNamespace
VariablesPath
33
public static
XNamespace
OutputPath
System\Runtime\WorkflowServiceNamespace.cs (5)
13
static readonly
XNamespace
workflowServiceNamespace =
XNamespace
.Get(baseNamespace);
14
static readonly
XNamespace
endpointsNamespace =
XNamespace
.Get(baseNamespace + "/endpoints");
27
public static
XNamespace
EndpointsPath
System.ServiceModel (6)
System\ServiceModel\Channels\CorrelationKey.cs (6)
20
static readonly
XNamespace
CorrelationNamespace =
XNamespace
.Get("urn:microsoft-com:correlation");
25
CorrelationKey(string keyString,
XNamespace
provider)
36
CorrelationKey(ReadOnlyStringDictionary keyData, string scopeName,
XNamespace
provider)
43
public CorrelationKey(IDictionary<string, string> keyData, XName scopeName,
XNamespace
provider)
63
public
XNamespace
Provider { get; private set; }
System.ServiceModel.Activities (5)
System\ServiceModel\Activities\Description\CorrelationQueryBehavior.cs (1)
127
this.ScopeName =
XNamespace
.Get(description.Namespace).GetName(description.Name);
System\ServiceModel\Activities\Dispatcher\DurableInstanceManager.cs (1)
45
InstanceValue sentinel = new InstanceValue(
XNamespace
.Get("http://tempuri.org").GetName("Sentinel"));
System\ServiceModel\Activities\WorkflowServiceHost.cs (2)
495
this.DurableInstancingOptions.ScopeName =
XNamespace
.Get(this.Description.Namespace).GetName(this.Description.Name);
503
this.ServiceName =
XNamespace
.Get(this.Description.Namespace).GetName(this.Description.Name);
System\ServiceModel\XamlIntegration\ServiceXNameTypeConverter.cs (1)
43
if (name.Namespace ==
XNamespace
.None)
System.Xml.Linq (96)
System\Xml\Linq\XLinq.cs (89)
37
XNamespace
ns;
44
internal XName(
XNamespace
ns, string localName) {
61
public
XNamespace
Namespace {
95
return
XNamespace
.Get(expandedName, 1, i - 1).GetName(expandedName, i + 1, expandedName.Length - i - 1);
98
return
XNamespace
.None.GetName(expandedName);
109
return
XNamespace
.Get(namespaceName).GetName(localName);
280
/// Returns the namespace name of this <see cref="
XNamespace
"/>.
294
public static
XNamespace
None {
303
public static
XNamespace
Xml {
312
public static
XNamespace
Xmlns {
325
public static
XNamespace
Get(string namespaceName) {
336
public static implicit operator
XNamespace
(string namespaceName) {
341
/// Combines an <see cref="
XNamespace
"/> object with a local name to create an <see cref="XName"/>.
347
public static XName operator +(
XNamespace
ns, string localName) {
353
/// Determines whether the specified <see cref="
XNamespace
"/> is equal to the current <see cref="
XNamespace
"/>.
357
/// true if the specified <see cref="
XNamespace
"/> is equal to the current XNamespace; otherwise false.
360
/// For two <see cref="
XNamespace
"/> objects to be equal they must have the same
368
/// Serves as a hash function for <see cref="
XNamespace
"/>. GetHashCode is suitable
383
/// Returns a value indicating whether two instances of <see cref="
XNamespace
"/> are equal.
392
public static bool operator ==(
XNamespace
left,
XNamespace
right) {
397
/// Returns a value indicating whether two instances of <see cref="
XNamespace
"/> are not equal.
406
public static bool operator !=(
XNamespace
left,
XNamespace
right) {
429
/// Returns an <see cref="
XNamespace
"/> created from a portion of the passed in namespace name parameter. The returned XNamespace
432
internal static
XNamespace
Get(string namespaceName, int index, int count) {
443
XNamespace
ns;
457
ns = (refNamespace != null) ? (
XNamespace
) refNamespace.Target : null;
478
XNamespace
ns;
480
if (r == null || (ns = (
XNamespace
) r.Target) == null)
492
private static
XNamespace
EnsureNamespace(ref WeakReference refNmsp, string namespaceName) {
502
XNamespace
ns = (
XNamespace
) refOld.Target;
3412
XNamespace
ns;
3415
public
XNamespace
Get(string namespaceName) {
3418
this.ns =
XNamespace
.Get(namespaceName);
3770
/// Returns the default <see cref="
XNamespace
"/> of an <see cref="XElement"/>
3772
public
XNamespace
GetDefaultNamespace() {
3774
return namespaceName != null ?
XNamespace
.Get(namespaceName) :
XNamespace
.None;
3782
/// <returns>An <see cref="
XNamespace
"/> for the namespace bound to the prefix</returns>
3783
public
XNamespace
GetNamespaceOfPrefix(string prefix) {
3786
if (prefix == "xmlns") return
XNamespace
.Xmlns;
3788
if (namespaceName != null) return
XNamespace
.Get(namespaceName);
3789
if (prefix == "xml") return
XNamespace
.Xml;
3796
/// <param name="ns">The <see cref="
XNamespace
"/> for which to get a prefix</param>
3798
public string GetPrefixOfNamespace(
XNamespace
ns) {
3826
if ((object)namespaceName == (object)
XNamespace
.xmlPrefixNamespace) {
3829
else if ((object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace) {
5068
name =
XNamespace
.Get(r.NamespaceURI).GetName(r.LocalName);
5084
XAttribute a = new XAttribute(
XNamespace
.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value);
5185
string GetPrefixOfNamespace(
XNamespace
ns, bool allowDefaultNamespace) {
5190
if ((object)namespaceName == (object)
XNamespace
.xmlPrefixNamespace) return "xml";
5191
if ((object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace) return "xmlns";
5204
resolver.AddFirst(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName,
XNamespace
.Get(a.Value));
5218
resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName,
XNamespace
.Get(a.Value));
5236
XNamespace
ns = e.Name.Namespace;
5245
writer.WriteAttributeString(GetPrefixOfNamespace(ns, false), localName, namespaceName.Length == 0 && localName == "xmlns" ?
XNamespace
.xmlnsPrefixNamespace : namespaceName, a.Value);
5254
public
XNamespace
ns;
5285
public void Add(string prefix,
XNamespace
ns) {
5300
public void AddFirst(string prefix,
XNamespace
ns) {
5318
public string GetPrefixOfNamespace(
XNamespace
ns, bool allowDefaultNamespace) {
6602
return (object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace;
7132
internal string GetPrefixOfNamespace(
XNamespace
ns) {
7136
if ((object)namespaceName == (object)
XNamespace
.xmlPrefixNamespace) return "xml";
7137
if ((object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace) return "xmlns";
7144
if ((object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace) {
7150
else if (value ==
XNamespace
.xmlPrefixNamespace) {
7155
else if (value ==
XNamespace
.xmlnsPrefixNamespace) {
7174
if (value ==
XNamespace
.xmlPrefixNamespace) {
7179
else if (value ==
XNamespace
.xmlnsPrefixNamespace) {
7413
XNamespace
ns = element.Name.Namespace;
7419
writer.WriteAttributeString(GetPrefixOfNamespace(ns, false), localName, namespaceName.Length == 0 && localName == "xmlns" ?
XNamespace
.xmlnsPrefixNamespace : namespaceName, a.Value);
7426
string GetPrefixOfNamespace(
XNamespace
ns, bool allowDefaultNamespace) {
7431
if ((object)namespaceName == (object)
XNamespace
.xmlPrefixNamespace) return "xml";
7432
if ((object)namespaceName == (object)
XNamespace
.xmlnsPrefixNamespace) return "xmlns";
7440
resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName,
XNamespace
.Get(a.Value));
7992
attrName =
XNamespace
.Get(prefix.Length == 0 ? string.Empty : namespaceName).GetName(localName);
8003
AddNode(new XElement(
XNamespace
.Get(namespaceName).GetName(localName)));
8265
return
XNamespace
.xmlnsPrefixNamespace;
8374
XName name =
XNamespace
.Xml.GetName("lang");
8394
XName name =
XNamespace
.Xml.GetName("space");
8467
if (namespaceName ==
XNamespace
.xmlnsPrefixNamespace) {
8522
XNamespace
ns = prefix.Length == 0 ? e.GetDefaultNamespace() : e.GetNamespaceOfPrefix(prefix);
8570
if (namespaceName ==
XNamespace
.xmlnsPrefixNamespace) {
8931
nameTable.Add(
XNamespace
.xmlnsPrefixNamespace);
8932
nameTable.Add(
XNamespace
.xmlPrefixNamespace);
8988
XNamespace
ns = e.GetNamespaceOfPrefix(qualifiedName.Substring(0, i));
System\Xml\Linq\XNodeNavigator.cs (4)
666
nameTable.Add(
XNamespace
.xmlnsPrefixNamespace);
667
nameTable.Add(
XNamespace
.xmlPrefixNamespace);
760
System.Threading.Interlocked.CompareExchange(ref XmlNamespaceDeclaration, new XAttribute(
XNamespace
.Xmlns.GetName("xml"),
XNamespace
.xmlPrefixNamespace), null);
System\Xml\Linq\XNodeValidator.cs (3)
30
XNamespace
xsi =
XNamespace
.Get("http://www.w3.org/2001/XMLSchema-instance");
234
a = new XAttribute(
XNamespace
.Get(sa.QualifiedName.Namespace).GetName(sa.QualifiedName.Name), GetDefaultValue(sa));