public static XamlHttpHandlerFactory.PathInfo EnsurePathInfo(string path)
 {
     XamlHttpHandlerFactory.PathInfo info = (XamlHttpHandlerFactory.PathInfo)pathCache[path];
     if (info != null)
     {
         return(info);
     }
     lock (writeLock)
     {
         info = (XamlHttpHandlerFactory.PathInfo)pathCache[path];
         if (info == null)
         {
             if (!HostingEnvironment.VirtualPathProvider.FileExists(path))
             {
                 throw FxTrace.Exception.AsError(new HttpException(0x194, System.Xaml.Hosting.SR.ResourceNotFound));
             }
             info = new XamlHttpHandlerFactory.PathInfo();
             pathCache.Add(path, info);
         }
         return(info);
     }
 }
 public static XamlHttpHandlerFactory.PathInfo EnsurePathInfo(string path)
 {
     XamlHttpHandlerFactory.PathInfo info = (XamlHttpHandlerFactory.PathInfo) pathCache[path];
     if (info != null)
     {
         return info;
     }
     lock (writeLock)
     {
         info = (XamlHttpHandlerFactory.PathInfo) pathCache[path];
         if (info == null)
         {
             if (!HostingEnvironment.VirtualPathProvider.FileExists(path))
             {
                 throw FxTrace.Exception.AsError(new HttpException(0x194, System.Xaml.Hosting.SR.ResourceNotFound));
             }
             info = new XamlHttpHandlerFactory.PathInfo();
             pathCache.Add(path, info);
         }
         return info;
     }
 }