mirror of https://github.com/EasyAbp/EShop.git
3 changed files with 36 additions and 7 deletions
@ -0,0 +1,11 @@ |
|||
using System.Threading.Tasks; |
|||
using Dapr.Actors; |
|||
using EasyAbp.EShop.Plugins.Inventories.DaprActors; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|||
|
|||
public interface IInventoryActorProvider |
|||
{ |
|||
Task<IInventoryActor> GetAsync(ActorId actorId, [NotNull] string actorType); |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System.Threading.Tasks; |
|||
using Dapr.Actors; |
|||
using Dapr.Actors.Client; |
|||
using EasyAbp.EShop.Plugins.Inventories.DaprActors; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|||
|
|||
public class InventoryActorProvider : IInventoryActorProvider, ITransientDependency |
|||
{ |
|||
public virtual Task<IInventoryActor> GetAsync(ActorId actorId, string actorType) |
|||
{ |
|||
return Task.FromResult(ActorProxy.Create<IInventoryActor>(actorId, actorType)); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue