mirror of https://github.com/abpframework/abp.git
7 changed files with 5 additions and 77 deletions
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.EventBus |
|||
{ |
|||
public class MySimpleAsyncEventDataHandler : IAsyncEventHandler<MySimpleEventData>, ISingletonDependency |
|||
{ |
|||
public int TotalData { get; private set; } |
|||
|
|||
public Task HandleEventAsync(MySimpleEventData eventData) |
|||
{ |
|||
TotalData += eventData.Value; |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.EventBus |
|||
{ |
|||
public class MySimpleTransientAsyncEventHandler : IAsyncEventHandler<MySimpleEventData>, IDisposable |
|||
{ |
|||
public static int HandleCount { get; set; } |
|||
|
|||
public static int DisposeCount { get; set; } |
|||
|
|||
public Task HandleEventAsync(MySimpleEventData eventData) |
|||
{ |
|||
++HandleCount; |
|||
return Task.FromResult(0); |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
++DisposeCount; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue