public virtual void Modify <T>(T entity, IModifyCommandInterceptor modifyInterceptor) where T : class { Check.NotNull(entity, "entity"); Check.NotNull(modifyInterceptor, "modifyInterceptor"); modifyInterceptor.Modify(this, CommandRepository.Modify, entity); }
public CommandInterceptors(IModifyCommandInterceptor modifyCommandInterceptor) : this() { Check.NotNull(modifyCommandInterceptor, "modifyCommandInterceptor"); ModifyCommandInterceptor = modifyCommandInterceptor; }
public virtual async Task ModifyAsync <T>(T entity, IModifyCommandInterceptor modifyInterceptor) where T : class { Check.NotNull(entity, "entity"); Check.NotNull(modifyInterceptor, "modifyInterceptor"); await Task.Run(() => Modify(entity, modifyInterceptor)); }
public CommandInterceptors(IModifyCommandInterceptor modifyCommandInterceptor) : this() { Check.NotNull(modifyCommandInterceptor, "modifyCommandInterceptor"); ModifyCommandInterceptor = modifyCommandInterceptor; }
protected override void ModifyEntityActioned <T>(T entity, IModifyCommandInterceptor modifyCommandInterceptor) { modifyCommandInterceptor.Modify( this, new Action <T>(p => { var collectionName = CollectionHelpers.CollectionNameFromEntity(entity); var result = MongoDatabase.GetCollection <T>(collectionName).Save(entity); RaiseEvent(new MongoDbEntityModifiedEvent(this, entity, result)); }), entity); }
public DefaultRepositoryInterceptors(IModifyCommandInterceptor modifyCommandInterceptor) { Check.NotNull(modifyCommandInterceptor, "modifyCommandInterceptor"); ModifyCommandInterceptor = modifyCommandInterceptor; }
public DefaultRepositoryInterceptors(IModifyCommandInterceptor modifyCommandInterceptor) { Check.NotNull(modifyCommandInterceptor, "modifyCommandInterceptor"); ModifyCommandInterceptor = modifyCommandInterceptor; }