Removed Subscriptions namespace
This commit is contained in:
parent
e4ed0c9962
commit
4b61cf1dea
|
@ -11,14 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Publishers", "src\Publisher
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Translating", "src\Translating\Translating.csproj", "{5549AC68-4155-4E42-B88C-672A8D39E420}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriptions", "src\Subscriptions\Subscriptions.csproj", "{08D3A876-4D42-49AC-AD6D-E597F9B89822}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A6E6BB70-923B-4A64-A5E6-8AFE18B535AA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Translating.Tests", "tests\Translating\Translating.Tests.csproj", "{E33F062A-2120-4AF0-8688-330A8CA7F0B0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriptions.Tests", "tests\Subscriptions\Subscriptions.Tests.csproj", "{90879E74-5F24-4ED6-9988-6FFFFE38B96A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtering", "src\Filtering\Filtering.csproj", "{A24F6F20-3B62-44E3-888D-CBCD3F29C477}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtering.Tests", "tests\Filtering\Filtering.Tests.csproj", "{308F1FFC-191C-4C33-900A-0567413BE1BB}"
|
||||
|
@ -46,18 +42,10 @@ Global
|
|||
{5549AC68-4155-4E42-B88C-672A8D39E420}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5549AC68-4155-4E42-B88C-672A8D39E420}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5549AC68-4155-4E42-B88C-672A8D39E420}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{08D3A876-4D42-49AC-AD6D-E597F9B89822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{08D3A876-4D42-49AC-AD6D-E597F9B89822}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{08D3A876-4D42-49AC-AD6D-E597F9B89822}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{08D3A876-4D42-49AC-AD6D-E597F9B89822}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E33F062A-2120-4AF0-8688-330A8CA7F0B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E33F062A-2120-4AF0-8688-330A8CA7F0B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E33F062A-2120-4AF0-8688-330A8CA7F0B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E33F062A-2120-4AF0-8688-330A8CA7F0B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{90879E74-5F24-4ED6-9988-6FFFFE38B96A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{90879E74-5F24-4ED6-9988-6FFFFE38B96A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{90879E74-5F24-4ED6-9988-6FFFFE38B96A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{90879E74-5F24-4ED6-9988-6FFFFE38B96A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A24F6F20-3B62-44E3-888D-CBCD3F29C477}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A24F6F20-3B62-44E3-888D-CBCD3F29C477}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A24F6F20-3B62-44E3-888D-CBCD3F29C477}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -75,9 +63,7 @@ Global
|
|||
{FF4D591C-67FE-4E8E-AD73-D13465D6DB44} = {C9061001-B6D0-49F8-AA95-5D421E96DDA2}
|
||||
{4856538B-EE02-4568-B133-4612B01601B0} = {C9061001-B6D0-49F8-AA95-5D421E96DDA2}
|
||||
{5549AC68-4155-4E42-B88C-672A8D39E420} = {C9061001-B6D0-49F8-AA95-5D421E96DDA2}
|
||||
{08D3A876-4D42-49AC-AD6D-E597F9B89822} = {C9061001-B6D0-49F8-AA95-5D421E96DDA2}
|
||||
{E33F062A-2120-4AF0-8688-330A8CA7F0B0} = {A6E6BB70-923B-4A64-A5E6-8AFE18B535AA}
|
||||
{90879E74-5F24-4ED6-9988-6FFFFE38B96A} = {A6E6BB70-923B-4A64-A5E6-8AFE18B535AA}
|
||||
{A24F6F20-3B62-44E3-888D-CBCD3F29C477} = {C9061001-B6D0-49F8-AA95-5D421E96DDA2}
|
||||
{308F1FFC-191C-4C33-900A-0567413BE1BB} = {A6E6BB70-923B-4A64-A5E6-8AFE18B535AA}
|
||||
{22F31937-7F3E-47B2-A8BB-DC2B889BA228} = {A6E6BB70-923B-4A64-A5E6-8AFE18B535AA}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
namespace ProSol.Messaging.Subscriptions;
|
||||
|
||||
public static class IPublisherFluentExtensions
|
||||
{
|
||||
[Obsolete("I am planning to remove these methods in next rc-release. Please use Filtering.Filter or Filtering.Endpoint instead.")]
|
||||
public static IPublisher Subscribe<TMessage>(
|
||||
this IPublisher publisher,
|
||||
ISubscriber<TMessage> subscriber,
|
||||
Predicate<TMessage> condition)
|
||||
{
|
||||
var subcription = new RegularSubscription<TMessage>(subscriber, condition);
|
||||
var unsubscriber = publisher.Subscribe(subcription);
|
||||
return publisher;
|
||||
}
|
||||
|
||||
[Obsolete("I am planning to remove these methods in next rc-release. Please use Filtering.Filter or Filtering.Endpoint instead.")]
|
||||
public static IPublisher Subscribe<TMessage>(
|
||||
this IPublisher publisher,
|
||||
IPipelineSubscriber<TMessage> subscriber,
|
||||
Predicate<TMessage> condition)
|
||||
{
|
||||
var subcription = new PipelineSubscription<TMessage>(subscriber, condition);
|
||||
var unsubscriber = publisher.Subscribe(subcription);
|
||||
return publisher;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
namespace ProSol.Messaging.Subscriptions;
|
||||
|
||||
internal class PipelineSubscription<TMessage>(
|
||||
IPipelineSubscriber<TMessage> subscriber,
|
||||
Predicate<TMessage> condition)
|
||||
: IPipelineSubscriber<TMessage>
|
||||
{
|
||||
public void OnCompleted()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnNext(TMessage message, NextDelegate next)
|
||||
{
|
||||
static void dropOff() { }; // acts like an endpoint.
|
||||
if (condition(message))
|
||||
{
|
||||
subscriber.OnNext(message, dropOff);
|
||||
}
|
||||
else
|
||||
{
|
||||
next();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
namespace ProSol.Messaging.Subscriptions;
|
||||
|
||||
internal class RegularSubscription<TMessage>(
|
||||
ISubscriber<TMessage> subscriber,
|
||||
Predicate<TMessage> condition)
|
||||
: ISubscriber<TMessage>
|
||||
{
|
||||
public void OnCompleted()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnNext(TMessage message)
|
||||
{
|
||||
if (condition(message))
|
||||
{
|
||||
subscriber.OnNext(message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Contracts\Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in a new issue