예제 #1
0
 /// <summary>
 /// <p>Determines whether a resource is accessible via the
 /// currently configured resource loaders. <see cref="Resource"/>
 /// is the generic description of templates, static content, etc.</p>
 ///
 /// <p>Note that the current implementation will <b>not</b> change
 /// the state of the system in any real way - so this cannot be
 /// used to pre-load the resource cache, as the previous
 /// implementation did as a side-effect.</p>
 /// </summary>
 /// <param name="templateName"> name of the template to search for</param>
 /// <returns>Whether the resource was located.</returns>
 public static bool ResourceExists(String templateName)
 {
     return(RuntimeSingleton.GetLoaderNameForResource(templateName) != null);
 }
예제 #2
0
파일: Velocity.cs 프로젝트: 15831944/tool
 /// <summary> <p>Determines whether a resource is accessable via the
 /// currently configured resource loaders.  {@link
 /// org.apache.velocity.runtime.resource.Resource} is the generic
 /// description of templates, static content, etc.</p>
 ///
 /// <p>Note that the current implementation will <b>not</b> change
 /// the state of the system in any real way - so this cannot be
 /// used to pre-load the resource cache, as the previous
 /// implementation did as a side-effect.</p>
 ///
 /// </summary>
 /// <param name="resourceName">The name of the resource to search for.
 /// </param>
 /// <returns> Whether the resource was located.
 /// </returns>
 public static bool ResourceExists(string resourceName)
 {
     return(RuntimeSingleton.GetLoaderNameForResource(resourceName) != null);
 }