예제 #1
0
        /// <summary>
        /// Appends UTF-8 encoded text to an existing GridFS file.
        /// </summary>
        /// <param name="remoteFileName">The remote file name.</param>
        /// <returns>A StreamWriter.</returns>
        public StreamWriter AppendText(
            string remoteFileName
            )
        {
            var fileInfo = new MongoGridFSFileInfo(this, remoteFileName);

            return(fileInfo.AppendText());
        }
예제 #2
0
 // public methods
 /// <summary>
 /// Appends UTF-8 encoded text to an existing GridFS file.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A StreamWriter.</returns>
 public StreamWriter AppendText(string remoteFileName)
 {
     using (_server.RequestStart(null, ReadPreference.Primary))
     {
         var serverInstance = _server.RequestConnection.ServerInstance;
         var fileInfo       = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return(fileInfo.AppendText());
     }
 }
 // public methods
 /// <summary>
 /// Appends UTF-8 encoded text to an existing GridFS file.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A StreamWriter.</returns>
 public StreamWriter AppendText(string remoteFileName)
 {
     if (_settings.ReadPreference != ReadPreference.Primary)
     {
         var gridFS = WithReadPreferencePrimary();
         return(gridFS.AppendText(remoteFileName));
     }
     using (_server.RequestStart(ReadPreference.Primary))
     {
         var serverInstance = _server.RequestServerInstance;
         var fileInfo       = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return(fileInfo.AppendText());
     }
 }
예제 #4
0
 /// <summary>
 /// Appends UTF-8 encoded text to an existing GridFS file.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A StreamWriter.</returns>
 public StreamWriter AppendText(
     string remoteFileName
 ) {
     var fileInfo = new MongoGridFSFileInfo(this, remoteFileName);
     return fileInfo.AppendText();
 }
예제 #5
0
 // public methods
 /// <summary>
 /// Appends UTF-8 encoded text to an existing GridFS file.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A StreamWriter.</returns>
 public StreamWriter AppendText(string remoteFileName)
 {
     using (_server.RequestStart(null, ReadPreference.Primary))
     {
         var serverInstance = _server.RequestConnection.ServerInstance;
         var fileInfo = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return fileInfo.AppendText();
     }
 }
예제 #6
0
 // public methods
 /// <summary>
 /// Appends UTF-8 encoded text to an existing GridFS file.
 /// </summary>
 /// <param name="remoteFileName">The remote file name.</param>
 /// <returns>A StreamWriter.</returns>
 public StreamWriter AppendText(string remoteFileName)
 {
     if (_settings.ReadPreference != ReadPreference.Primary)
     {
         var gridFS = WithReadPreferencePrimary();
         return gridFS.AppendText(remoteFileName);
     }
     using (_server.RequestStart(null, ReadPreference.Primary))
     {
         var serverInstance = _server.RequestServerInstance;
         var fileInfo = new MongoGridFSFileInfo(_server, serverInstance, _databaseName, _settings, remoteFileName);
         return fileInfo.AppendText();
     }
 }