Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_changeNotifier != null)
         {
             _changeNotifier.Dispose();
             _changeNotifier = null;
         }
     }
 }
Exemplo n.º 2
0
        public EntityChangeMonitor(Expression <Func <TEntity, bool> > query)
        {
            _context        = new TDbContext();
            _query          = query;
            _uniqueId       = Guid.NewGuid().ToString();
            _changeNotifier = new EntityChangeNotifier <TEntity, TDbContext>(_query);

            _changeNotifier.Error   += new EventHandler <NotifierErrorEventArgs>(_changeNotifier_Error);
            _changeNotifier.Changed += new EventHandler <EntityChangeEventArgs <TEntity> >(_changeNotifier_Changed);

            InitializationComplete();
        }