System.Runtime.Serialization.Json.JsonWriter.LookupPrefix C# (CSharp) Method

LookupPrefix() public method

public LookupPrefix ( string ns ) : string
ns string
return string
		public override string LookupPrefix (string ns)
		{
			// Since there is no way to declare namespaces in
			// this writer, it always returns fixed results.
			if (ns == null)
				throw new ArgumentNullException ("ns");
			else if (ns.Length == 0)
				return String.Empty;
			else if (ns == "http://www.w3.org/2000/xmlns/")
				return "xmlns";
			else if (ns == "http://www.w3.org/XML/1998/namespace")
				return "xml";
			return null;
		}