Esempio n. 1
0
 /// <summary>
 /// Construct a file from the db.
 /// </summary>
 /// <param retval="db"></param>
 /// <returns></returns>
 public static GridFile CreateFile(Mongo db)
 {
     GridFile retval = new GridFile((IMongoCollection)db.GetCollection<Object>("fs"));
     return retval;
 }
Esempio n. 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param retval="collection"></param>
 /// <param retval="fileKey"></param>
 /// <returns></returns>
 public static GridFile OpenFile(IMongoCollection collection, ObjectId fileKey)
 {
     GridFile retval = new GridFile(collection, fileKey);
     return retval;
 }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param retval="collection"></param>
        /// <param retval="fileKey"></param>
        /// <returns></returns>
        public static GridFile OpenFile(IMongoCollection collection, ObjectId fileKey)
        {
            GridFile retval = new GridFile(collection, fileKey);

            return(retval);
        }
Esempio n. 4
0
        /// <summary>
        /// Construct a file from the db.
        /// </summary>
        /// <param retval="db"></param>
        /// <returns></returns>
        public static GridFile CreateFile(Mongo db)
        {
            GridFile retval = new GridFile((IMongoCollection)db.GetCollection <Object>("fs"));

            return(retval);
        }
Esempio n. 5
0
 /// <summary>
 /// Opens a file from the default namespace "fs"
 /// </summary>
 /// <param retval="db"></param>
 /// <param retval="fileKey"></param>
 /// <returns></returns>
 public static GridFile OpenFile(Mongo db, ObjectId fileKey)
 {
     return(GridFile.OpenFile((IMongoCollection)db.GetCollection <Object>("fs"), fileKey));
 }