public void Execute(OperationTypeEnum op, OperationStage stage, Entity entity, Schema.Domain.Entity entityMetadata, List <Schema.Domain.Attribute> attributeMetadatas) { var plugins = _entityPluginFinder.QueryByEntityId(entityMetadata.EntityId, Enum.GetName(typeof(OperationTypeEnum), op)); if (plugins.NotEmpty()) { foreach (var pg in plugins) { if (pg.StateCode == RecordState.Disabled) { continue; } var pinstance = GetInstance(pg); if (pinstance != null) { pinstance.Execute(new PluginExecutionContext() { MessageName = op , Stage = stage , Target = entity , User = _currentUser , EntityMetadata = entityMetadata , AttributeMetadatas = attributeMetadatas }); } } } }
public void Execute(Guid entityId, Guid?businessObjectId, PlugInType typeCode, OperationTypeEnum op, OperationStage stage, TData tData, KMetadata kMetadata) { var plugins = _entityPluginFinder.QueryByEntityId(entityId, Enum.GetName(typeof(OperationTypeEnum), op), businessObjectId, typeCode); if (plugins.NotEmpty()) { foreach (var pg in plugins) { if (pg.StateCode == RecordState.Disabled) { continue; } var pinstance = GetInstance(pg); if (pinstance != null) { pinstance.Execute(new PluginExecutionContextT <TData, KMetadata>() { MessageName = op , Stage = stage , User = _currentUser , Target = tData , metadata = kMetadata }); } } } }