Created initial distributed eventbus module.

pull/272/head
Halil İbrahim Kalkan 8 years ago
parent ab37014ada
commit 0567a40c8f

@ -168,7 +168,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Auditing.Tests", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.MongoDB.Tests", "test\Volo.Abp.MongoDB.Tests\Volo.Abp.MongoDB.Tests.csproj", "{82ED4DD2-DEF8-40D5-9BF9-663AFD35B06D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EntityFrameworkCore.SqlServer", "src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj", "{6EABA98D-0B71-4ED7-A939-AFDA106D1151}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.EntityFrameworkCore.SqlServer", "src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj", "{6EABA98D-0B71-4ED7-A939-AFDA106D1151}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Distributed", "src\Volo.Abp.EventBus.Distributed\Volo.Abp.EventBus.Distributed.csproj", "{CFC98B88-8CCC-469B-8D60-482D3C94A690}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Distributed.RabbitMQ", "src\Volo.Abp.EventBus.Distributed.RabbitMQ\Volo.Abp.EventBus.Distributed.RabbitMQ.csproj", "{468C3DCB-8C00-40E7-AE51-0738EAAB312A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Distributed.Tests", "test\Volo.Abp.EventBus.Distributed.Tests\Volo.Abp.EventBus.Distributed.Tests.csproj", "{0AE814CE-E155-4259-8746-262D174AB510}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -472,6 +478,18 @@ Global
{6EABA98D-0B71-4ED7-A939-AFDA106D1151}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EABA98D-0B71-4ED7-A939-AFDA106D1151}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EABA98D-0B71-4ED7-A939-AFDA106D1151}.Release|Any CPU.Build.0 = Release|Any CPU
{CFC98B88-8CCC-469B-8D60-482D3C94A690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFC98B88-8CCC-469B-8D60-482D3C94A690}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFC98B88-8CCC-469B-8D60-482D3C94A690}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFC98B88-8CCC-469B-8D60-482D3C94A690}.Release|Any CPU.Build.0 = Release|Any CPU
{468C3DCB-8C00-40E7-AE51-0738EAAB312A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{468C3DCB-8C00-40E7-AE51-0738EAAB312A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{468C3DCB-8C00-40E7-AE51-0738EAAB312A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{468C3DCB-8C00-40E7-AE51-0738EAAB312A}.Release|Any CPU.Build.0 = Release|Any CPU
{0AE814CE-E155-4259-8746-262D174AB510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AE814CE-E155-4259-8746-262D174AB510}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AE814CE-E155-4259-8746-262D174AB510}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AE814CE-E155-4259-8746-262D174AB510}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -553,6 +571,9 @@ Global
{D5733D90-8C3D-4026-85E2-41DED26C4938} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{82ED4DD2-DEF8-40D5-9BF9-663AFD35B06D} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{6EABA98D-0B71-4ED7-A939-AFDA106D1151} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{CFC98B88-8CCC-469B-8D60-482D3C94A690} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{468C3DCB-8C00-40E7-AE51-0738EAAB312A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{0AE814CE-E155-4259-8746-262D174AB510} = {447C8A77-E5F0-4538-8687-7383196D04EA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.EventBus.Distributed.RabbitMQ</AssemblyName>
<PackageId>Volo.Abp.EventBus.Distributed.RabbitMQ</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.EventBus.Distributed\Volo.Abp.EventBus.Distributed.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,14 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace Volo.Abp.EventBus.Distributed.RabbitMq
{
[DependsOn(typeof(AbpDistributedEventBusModule))]
public class AbpRabbitMqDistributedEventBusModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpRabbitMqDistributedEventBusModule>();
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.EventBus.Distributed.RabbitMq
{
public class RabbitMqDistributedEventBus : IDistributedEventBus, ITransientDependency
{
public Task PublishAsync<TEvent>(TEvent eventData)
where TEvent : class
{
throw new NotImplementedException();
}
public Task PublishAsync(Type eventType, object eventData)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.EventBus.Distributed</AssemblyName>
<PackageId>Volo.Abp.EventBus.Distributed</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.EventBus\Volo.Abp.EventBus.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,14 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace Volo.Abp.EventBus.Distributed
{
[DependsOn(typeof(AbpEventBusModule))]
public class AbpDistributedEventBusModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpDistributedEventBusModule>();
}
}
}

@ -0,0 +1,13 @@
using System;
using System.Threading.Tasks;
namespace Volo.Abp.EventBus.Distributed
{
public interface IDistributedEventBus
{
Task PublishAsync<TEvent>(TEvent eventData)
where TEvent : class;
Task PublishAsync(Type eventType, object eventData);
}
}

@ -0,0 +1,27 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.EventBus.Distributed
{
public class LocalDistributedEventBus : IDistributedEventBus, ITransientDependency
{
private readonly IEventBus _eventBus;
public LocalDistributedEventBus(IEventBus eventBus)
{
_eventBus = eventBus;
}
public Task PublishAsync<TEvent>(TEvent eventData)
where TEvent : class
{
return _eventBus.TriggerAsync(eventData);
}
public Task PublishAsync(Type eventType, object eventData)
{
return _eventBus.TriggerAsync(eventType, eventData);
}
}
}

@ -1,7 +0,0 @@
namespace Volo.Abp.EventBus
{
public interface IDistributedEventBus
{
}
}

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Volo.Abp.EventBus.Distributed.Tests</AssemblyName>
<PackageId>Volo.Abp.EventBus.Distributed.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.EventBus.Distributed\Volo.Abp.EventBus.Distributed.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
</ItemGroup>
</Project>
Loading…
Cancel
Save