GreenQloud.Persistence.SQLite.SQLiteRepositoryIgnoreDAO.All C# (CSharp) Method

All() public method

public All ( LocalRepository repo ) : List
repo LocalRepository
return List
        public override List<RepositoryIgnore> All(LocalRepository repo)
        {
            return Select(string.Format("SELECT * FROM RepositoryIgnore where RepositoryId = '{0}' ", repo.Id));
        }

Usage Example

Example #1
0
 public override void IgnoreFromIgnordList(Event e)
 {
     RepositoryIgnoreDAO ignoreDato = new SQLiteRepositoryIgnoreDAO();
     List<RepositoryIgnore> ignores = ignoreDato.All(this.repo);
     bool ignore = false;
     foreach (RepositoryIgnore ignoreItem in ignores)
     {
         if (e.Item.Key.StartsWith(ignoreItem.Path) || (e.EventType == EventType.MOVE && e.Item.ResultItem.Key.StartsWith(ignoreItem.Path)))
         {
             ignore = true;
         }
     }
     if(ignore)
         database.ExecuteNonQuery(string.Format("UPDATE EVENT SET  SYNCHRONIZED = '{0}', RESPONSE = '{1}' WHERE EventID = '{2}'", bool.TrueString, RESPONSE.IGNORED.ToString(), e.Id));
 }
All Usage Examples Of GreenQloud.Persistence.SQLite.SQLiteRepositoryIgnoreDAO::All
SQLiteRepositoryIgnoreDAO