コード例 #1
0
ファイル: LiteDatabase.cs プロジェクト: heliomarpm/LiteDB
        /// <summary>
        /// Drop a collection and all data + indexes
        /// </summary>
        public bool DropCollection(string name)
        {
            if (name.IsNullOrWhiteSpace())
            {
                throw new ArgumentNullException(nameof(name));
            }

            return(_engine.DropCollection(name));
        }
コード例 #2
0
 public bool DropCollection(string name)
 {
     try
     {
         NotificationService.Cache.AddBroadcast(name);
         var result = _engine.DropCollection(name);
         NotificationService.Notify();
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         NotificationService.Clear();
     }
 }