System.Web.Script.Services.LogicalTypeInfo.EnsureNamespaceRegistered C# (CSharp) Method

EnsureNamespaceRegistered() protected static method

protected static EnsureNamespaceRegistered ( string ns, string name, StringBuilder proxy, List registeredNamespaces ) : string
ns string
name string
proxy StringBuilder
registeredNamespaces List
return string
		protected static string EnsureNamespaceRegistered (string ns, string name, StringBuilder proxy, List<string> registeredNamespaces) {
			if (String.IsNullOrEmpty (ns))
				return "var " + name;

			if (!registeredNamespaces.Contains (ns)) {
				registeredNamespaces.Add (ns);
				proxy.AppendFormat (
@"
Type.registerNamespace('{0}');",
								   ns);
			}
			return name;
		}