mirror of https://github.com/abpframework/abp.git
6 changed files with 34 additions and 8 deletions
@ -0,0 +1,14 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.AI; |
||||
|
|
||||
|
public class NamedActionList<T> : NamedObjectList<NamedAction<T>> |
||||
|
{ |
||||
|
public void Add(Action<T> action) |
||||
|
{ |
||||
|
this.Add(Guid.NewGuid().ToString("N"), action); |
||||
|
} |
||||
|
|
||||
|
public void Add(string name, Action<T> action) |
||||
|
=> this.Add(new NamedAction<T>(name, action)); |
||||
|
} |
||||
Loading…
Reference in new issue