-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from buildersoftdev/feature/core-structure
Feature/core structure
- Loading branch information
Showing
26 changed files
with
680 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Buildersoft.Messaging.Builder; | ||
using Microsoft.Extensions.Logging; | ||
using System; | ||
|
||
namespace Buildersoft.Messaging.Abstraction | ||
{ | ||
public interface IMessagingClient | ||
{ | ||
IMessagingClient GetClient(); | ||
IMessagingClient Build(); | ||
MessagingClientBuilder GetBuilder(); | ||
ILoggerFactory GetLoggerFactory(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Buildersoft.Messaging/Abstraction/IMessagingConsumer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Andy.X.Client.Events.Consumers; | ||
using System.Threading; | ||
|
||
namespace Buildersoft.Messaging.Abstraction | ||
{ | ||
public interface IMessagingConsumer<T> | ||
{ | ||
delegate bool MessageReceivedHandler(object sender, MessageReceivedArgs<T> messageReceivedArgs); | ||
event MessageReceivedHandler MessageReceived; | ||
|
||
delegate void StatusChangedHandler(object sender, string status); | ||
event StatusChangedHandler StatusChanged; | ||
|
||
void StopConsuming(); | ||
void StartConsuming(); | ||
string GetInitializedConsumerName(); | ||
string GetConsumerState(); | ||
CancellationTokenSource GetCancellationTokenSource(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Buildersoft.Messaging/Abstraction/IMessagingProducer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Buildersoft.Messaging.Abstraction | ||
{ | ||
public interface IMessagingProducer<T> | ||
{ | ||
delegate void StatusChangedHandler(object sender, string status); | ||
event StatusChangedHandler StatusChanged; | ||
|
||
Task<Guid> SendAsync(T tEntity, string key = ""); | ||
CancellationTokenSource GetCancellationTokenSource(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using Buildersoft.Messaging.Builder; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Buildersoft.Messaging.App.Andy | ||
{ | ||
public class AndyClient : IMessagingClient | ||
{ | ||
public IMessagingClient Build() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public MessagingClientBuilder GetBuilder() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public IMessagingClient GetClient() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public ILoggerFactory GetLoggerFactory() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System.Threading; | ||
|
||
namespace Buildersoft.Messaging.App.Andy | ||
{ | ||
public class AndyConsumer<T> : IMessagingConsumer<T> | ||
{ | ||
public event IMessagingConsumer<T>.MessageReceivedHandler MessageReceived; | ||
public event IMessagingConsumer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetConsumerState() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetInitializedConsumerName() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StartConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StopConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Buildersoft.Messaging.App.Andy | ||
{ | ||
public class AndyProducer<T> : IMessagingProducer<T> | ||
{ | ||
public event IMessagingProducer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<Guid> SendAsync(T tEntity, string key = "") | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using Buildersoft.Messaging.Builder; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Buildersoft.Messaging.App.Kafka | ||
{ | ||
public class KafkaClient : IMessagingClient | ||
{ | ||
public IMessagingClient Build() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public MessagingClientBuilder GetBuilder() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public IMessagingClient GetClient() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public ILoggerFactory GetLoggerFactory() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System.Threading; | ||
|
||
namespace Buildersoft.Messaging.App.Kafka | ||
{ | ||
public class KafkaConsumer<T> : IMessagingConsumer<T> | ||
{ | ||
public event IMessagingConsumer<T>.MessageReceivedHandler MessageReceived; | ||
public event IMessagingConsumer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetConsumerState() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetInitializedConsumerName() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StartConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StopConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Buildersoft.Messaging.App.Kafka | ||
{ | ||
public class KafkaProducer<T> : IMessagingProducer<T> | ||
{ | ||
public event IMessagingProducer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<Guid> SendAsync(T tEntity, string key = "") | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using Buildersoft.Messaging.Builder; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Buildersoft.Messaging.App.Pulsar | ||
{ | ||
public class PulsarClient : IMessagingClient | ||
{ | ||
public IMessagingClient Build() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public MessagingClientBuilder GetBuilder() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public IMessagingClient GetClient() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public ILoggerFactory GetLoggerFactory() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System.Threading; | ||
|
||
namespace Buildersoft.Messaging.App.Pulsar | ||
{ | ||
public class PulsarConsumer<T> : IMessagingConsumer<T> | ||
{ | ||
public event IMessagingConsumer<T>.MessageReceivedHandler MessageReceived; | ||
public event IMessagingConsumer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetConsumerState() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public string GetInitializedConsumerName() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StartConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public void StopConsuming() | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Buildersoft.Messaging.Abstraction; | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Buildersoft.Messaging.App.Pulsar | ||
{ | ||
public class PulsarProducer<T> : IMessagingProducer<T> | ||
{ | ||
public event IMessagingProducer<T>.StatusChangedHandler StatusChanged; | ||
|
||
public CancellationTokenSource GetCancellationTokenSource() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<Guid> SendAsync(T tEntity, string key = "") | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Buildersoft.Messaging/Builder/MessagingClientBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Buildersoft.Messaging.Configuration; | ||
|
||
namespace Buildersoft.Messaging.Builder | ||
{ | ||
public class MessagingClientBuilder | ||
{ | ||
public MessagingClientConfiguration MessagingConfiguration { get; private set; } | ||
|
||
public MessagingClientBuilder(MessagingClientConfiguration messagingConfiguration) | ||
{ | ||
MessagingConfiguration = messagingConfiguration; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Buildersoft.Messaging/Builder/MessagingConsumerBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Buildersoft.Messaging.Configuration; | ||
|
||
namespace Buildersoft.Messaging.Builder | ||
{ | ||
public class MessagingConsumerBuilder<T> | ||
{ | ||
public MessagingConsumerConfiguration<T> MessagingConsumerConfiguration { get; private set; } | ||
|
||
public MessagingConsumerBuilder(MessagingConsumerConfiguration<T> messagingConsumerConfiguration) | ||
{ | ||
MessagingConsumerConfiguration = messagingConsumerConfiguration; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Buildersoft.Messaging/Builder/MessagingProducerBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Buildersoft.Messaging.Configuration; | ||
|
||
namespace Buildersoft.Messaging.Builder | ||
{ | ||
public class MessagingProducerBuilder<T> | ||
{ | ||
public MessagingProducerConfiguration<T> MessagingProducerConfiguration { get; private set; } | ||
|
||
public MessagingProducerBuilder(MessagingProducerConfiguration<T> messagingProducerConfiguration) | ||
{ | ||
MessagingProducerConfiguration = messagingProducerConfiguration; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.