System.Web.Compilation.TemplateControlCompiler.ResourceProviderHasObject C# (CSharp) Method

ResourceProviderHasObject() private method

private ResourceProviderHasObject ( string key ) : bool
key string
return bool
		bool ResourceProviderHasObject (string key)
		{
			IResourceProvider rp = HttpContext.GetResourceProvider (InputVirtualPath.Absolute, true);
			if (rp == null)
				return false;

			IResourceReader rr = rp.ResourceReader;
			if (rr == null)
				return false;

			try {
				IDictionaryEnumerator ide = rr.GetEnumerator ();
				if (ide == null)
					return false;
			
				string dictKey;
				while (ide.MoveNext ()) {
					dictKey = ide.Key as string;
					if (String.IsNullOrEmpty (dictKey))
						continue;
					if (String.Compare (key, dictKey, StringComparison.Ordinal) == 0)
						return true;
				}
			} finally {
				rr.Close ();
			}
			
			return false;
		}
		
TemplateControlCompiler