System.Runtime.Serialization.XPathQueryGenerator.ExportContext.SetNamespace C# (CSharp) Method

SetNamespace() public method

public SetNamespace ( string ns ) : string
ns string
return string
            public string SetNamespace(string ns)
            {
                string prefix = _namespaces.LookupPrefix(ns);
                if (prefix == null || prefix.Length == 0)
                {
                    prefix = "xg" + (_nextPrefix++).ToString(NumberFormatInfo.InvariantInfo);
                    Namespaces.AddNamespace(prefix, ns);
                }
                return prefix;
            }
        }