예제 #1
0
        /// <summary>
        /// Opens an existing UTF-8 encoded text GridFS file for reading.
        /// </summary>
        /// <param name="remoteFileName">The remote file name.</param>
        /// <returns>A stream reader.</returns>
        public StreamReader OpenText(
            string remoteFileName
            )
        {
            var fileInfo = new MongoGridFSFileInfo(this, remoteFileName);

            return(fileInfo.OpenText());
        }
 /// <summary>
 /// Opens an existing UTF-8 encoded text GridFS file for reading.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A stream reader.</returns>
 public StreamReader OpenText(string remoteFileName)
 {
     using (_server.RequestStart(_settings.ReadPreference))
     {
         var serverInstance = _server.RequestServerInstance;
         var fileInfo       = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return(fileInfo.OpenText());
     }
 }
예제 #3
0
 /// <summary>
 /// Opens an existing UTF-8 encoded text GridFS file for reading.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A stream reader.</returns>
 public StreamReader OpenText(
     string remoteFileName
 ) {
     var fileInfo = new MongoGridFSFileInfo(this, remoteFileName);
     return fileInfo.OpenText();
 }
예제 #4
0
 /// <summary>
 /// Opens an existing UTF-8 encoded text GridFS file for reading.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A stream reader.</returns>
 public StreamReader OpenText(string remoteFileName)
 {
     using (_server.RequestStart(null, _settings.ReadPreference))
     {
         var serverInstance = _server.RequestConnection.ServerInstance;
         var fileInfo = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return fileInfo.OpenText();
     }
 }