private void CreateHandlers(IDbEntity entity, string path) { _isCreatingHandlers = true; try { Type projection = _projection.Eval(path); DbEntityRecursion.DepthFirst(entity, projection, path, (e, p) => { }, (e, entityPath, propertyPath, prop) => { }, _createHandlersBeforeCollectionRecursionAction, _createHandlersAfterCollectionRecursionAction, _createHandlersAfterRecursionAction); } catch (ArgumentNullException) { /** This is thrown in cases where the projection does not cover the path specified **/ } finally { _isCreatingHandlers = false; } }
private void RemoveHandlers(IDbEntity entity, string path) { Type projection = _projection.Eval(path); DbEntityRecursion.DepthFirst(entity, projection, path, _removeHandlersBeforeRecursionAction, (e, p, propertyPath, prop) => { }, _removeHandlersCollectionPropertyAction, (e, es, p, propertyPath, prop) => { }, (e, p) => { }); }