示例#1
0
 /// <summary>
 ///     Creates a new MongoVirtualFile
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="virtualPath"></param>
 /// <param name="query"></param>
 public MongoVirtualFile(MongoReaderPlugin parent, string virtualPath, NameValueCollection query)
 {
     if (!virtualPath.StartsWith(parent.VirtualFilesystemPrefix, StringComparison.OrdinalIgnoreCase))
     {
         throw new ApplicationException("The specified virtual file must exist within the prefix: " +
                                        parent.VirtualFilesystemPrefix);
     }
     _virtualPath = virtualPath;
     Query        = new ResizeSettings(query);
     _filename    = virtualPath.Substring(parent.VirtualFilesystemPrefix.Length);
     _parent      = parent;
 }
示例#2
0
 /// <summary>
 ///     Creates a new MongoVirtualFile
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="virtualPath"></param>
 /// <param name="query"></param>
 public MongoVirtualFile(MongoReaderPlugin parent, string virtualPath, NameValueCollection query)
 {
     if (!virtualPath.StartsWith(parent.VirtualFilesystemPrefix, StringComparison.OrdinalIgnoreCase))
         throw new ApplicationException("The specified virtual file must exist within the prefix: " +
                                        parent.VirtualFilesystemPrefix);
     _virtualPath = virtualPath;
     Query = new ResizeSettings(query);
     _filename = virtualPath.Substring(parent.VirtualFilesystemPrefix.Length);
     _parent = parent;
 }