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