init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
163
Kreta.MessageBroker/Client/MessageClient.cs
Normal file
163
Kreta.MessageBroker/Client/MessageClient.cs
Normal file
|
@ -0,0 +1,163 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.MessageBroker;
|
||||
using Kreta.Core.MessageBroker.Client.Implementations;
|
||||
using Kreta.Core.MessageBroker.Contract;
|
||||
using Kreta.Core.MessageBroker.Logging;
|
||||
using Kreta.Core.MessageBroker.Logging.Serilog;
|
||||
using Kreta.MessageBroker.ClientFactory;
|
||||
using Kreta.MessageBroker.Configuration;
|
||||
using Kreta.MessageBroker.TraceLog;
|
||||
using log4net;
|
||||
|
||||
namespace Kreta.MessageBroker.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Message client
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Message object</typeparam>
|
||||
abstract class MessageClient<T> : IMessageClient<T>
|
||||
where T : Message
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
private IntegratedMessageClient<T> IntegratedMessageClient { get; }
|
||||
|
||||
private string MessageSignatureKey { get; }
|
||||
|
||||
private int QueueSize { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Public Methods]
|
||||
|
||||
/// <summary>
|
||||
/// Üzenet küldése
|
||||
/// </summary>
|
||||
/// <param name="message">Üzenet</param>
|
||||
/// <remarks>A metódus az üzenetet várakozási sorba helyezi és azonal visszatér.
|
||||
/// Ha a várakozási sor megtellik, az üzenetet eldobja</remarks>
|
||||
public async Task PostAsync(T message)
|
||||
{
|
||||
message.CreateSignature(this.MessageSignatureKey);
|
||||
|
||||
await this.IntegratedMessageClient.PostAsync(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Üzenet küldése
|
||||
/// </summary>
|
||||
/// <param name="message">Üzenet</param>
|
||||
public void Post(T message)
|
||||
{
|
||||
if (this.QueueSize == 0)
|
||||
{
|
||||
Task.Run(async () => await PostAsync(message));
|
||||
}
|
||||
else
|
||||
{
|
||||
PostAsync(message).Wait();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Üzenet tömb küldése
|
||||
/// </summary>
|
||||
/// <param name="messages">Üzenetek</param>
|
||||
/// <remarks>A metódus addig nem tér vissza amig el nem küldtük az összes üzenetet</remarks>
|
||||
public async Task PostAsync(T[] messages)
|
||||
{
|
||||
foreach (var message in messages)
|
||||
{
|
||||
message.CreateSignature(this.MessageSignatureKey);
|
||||
}
|
||||
|
||||
await this.IntegratedMessageClient.PostAsync(messages);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Üzenet tömb küldése
|
||||
/// </summary>
|
||||
/// <param name="messages">Üzenetek</param>
|
||||
/// <remarks>A metódus addig nem tér vissza amig el nem küldtük az összes üzenetet</remarks>
|
||||
public void Post(T[] messages)
|
||||
{
|
||||
PostAsync(messages).Wait();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Constructor(s)]
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="jsonMessageClientFactory">Json message client factory</param>
|
||||
/// <param name="messageClientName">Message client name</param>
|
||||
/// <param name="configuration">Configuration</param>
|
||||
/// <param name="loggerName">Logger name</param>
|
||||
protected MessageClient(string messageClientName, IJsonMessageClientFactory<T> jsonMessageClientFactory, IMessageBrokerConfiguration configuration, ITraceMessageClient traceMessageClient, ISerilogTraceLogger serilogTraceLogger, string loggerName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(messageClientName))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(messageClientName)} cannot be null or whitespace");
|
||||
}
|
||||
|
||||
if (jsonMessageClientFactory == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(jsonMessageClientFactory));
|
||||
}
|
||||
|
||||
if (traceMessageClient == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(traceMessageClient));
|
||||
}
|
||||
|
||||
if (configuration == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configuration));
|
||||
}
|
||||
|
||||
var clientConfiguration = configuration.Clients.Cast<MessageClientConfigurationElement>().FirstOrDefault(c => c.Name.Equals(messageClientName, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (clientConfiguration == null)
|
||||
{
|
||||
throw new ArgumentException($"Client configuration was not found for client {messageClientName}");
|
||||
}
|
||||
|
||||
this.QueueSize = clientConfiguration.QueueSize;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(clientConfiguration.MessageSignatureKey))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(clientConfiguration.MessageSignatureKey)} cannot be null or whitespace");
|
||||
}
|
||||
|
||||
this.MessageSignatureKey = clientConfiguration.MessageSignatureKey;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(loggerName))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(loggerName)} cannot be null or whitespace");
|
||||
}
|
||||
|
||||
IKeyValueLogger keyValueLogger = null;
|
||||
|
||||
if (clientConfiguration.LoggerType == LoggerType.Log4Net)
|
||||
{
|
||||
keyValueLogger = new Log4NetKeyValueLogger(LogManager.GetLogger(loggerName));
|
||||
}
|
||||
else if (clientConfiguration.LoggerType == LoggerType.Serilog)
|
||||
{
|
||||
keyValueLogger = new SerilogKeyValueLogger(clientConfiguration.SerilogLogger, serilogTraceLogger);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotSupportedException($"Not supported logger type {clientConfiguration.LoggerType}");
|
||||
}
|
||||
|
||||
this.IntegratedMessageClient = new IntegratedMessageClient<T>(clientConfiguration, jsonMessageClientFactory, keyValueLogger, traceMessageClient);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using Kreta.Core.MessageBroker.Contract.MobileNotification;
|
||||
using Kreta.MessageBroker.ClientFactory;
|
||||
using Kreta.MessageBroker.Configuration;
|
||||
using Kreta.MessageBroker.TraceLog;
|
||||
|
||||
namespace Kreta.MessageBroker.Client.MobileNotification
|
||||
{
|
||||
/// <summary>
|
||||
/// Mobile notification client
|
||||
/// </summary>
|
||||
class MobileNotificationMessageClient : MessageClient<MobileNotificationMessage>
|
||||
{
|
||||
#region [Constructor(s)]
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="jsonMessageClientFactory">Json message client factory of mobile notification message</param>
|
||||
/// <param name="configuration">Configuration</param>
|
||||
public MobileNotificationMessageClient(
|
||||
IJsonMessageClientFactory<MobileNotificationMessage> jsonMessageClientFactory,
|
||||
IMessageBrokerConfiguration configuration,
|
||||
ITraceMessageClient traceMessageClient,
|
||||
ISerilogTraceLogger serilogTraceLogger) : base(Constants.MobileNotificationMessageClient.Name,
|
||||
jsonMessageClientFactory,
|
||||
configuration,
|
||||
traceMessageClient,
|
||||
serilogTraceLogger,
|
||||
Constants.MobileNotificationMessageClient.LoggerName)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
using System.Threading.Tasks;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification.Enum;
|
||||
|
||||
namespace Kreta.MessageBroker.Client.MobileNotification
|
||||
{
|
||||
/// <summary>
|
||||
/// Mobile notification message helper
|
||||
/// </summary>
|
||||
public class MobileNotificationMessageHelper
|
||||
{
|
||||
#region [Public Methods]
|
||||
|
||||
/// <summary>
|
||||
/// Create
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="instituteUserId">Institute user id</param>
|
||||
/// <param name="itemId">Item id</param>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="notificationType">Notification type</param>
|
||||
public static MobileNotificationMessage CreateMessage(string instituteCode, int instituteUserId, MobileNotificationMessageType notificationType, int itemId, string message)
|
||||
{
|
||||
return new MobileNotificationMessage(instituteCode, instituteUserId, MobileNotificationMessageRole.Student | MobileNotificationMessageRole.Tutelary, notificationType, MobileNotificationMessageSource.Kreta, MobileNotificationMessageDestination.RoleGroup, itemId, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="instituteUserId">Institute user id</param>
|
||||
/// <param name="notificationType">Notification type</param>
|
||||
/// <param name="itemId">Item id</param>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="title">Need for message address</param>
|
||||
/// <param name="data">Can hold any data</param>
|
||||
public static MobileNotificationMessage CreateMessage(string instituteCode, int instituteUserId, MobileNotificationMessageType notificationType, int itemId, string message, string title = "", string data = "")
|
||||
{
|
||||
return new MobileNotificationMessage(instituteCode, instituteUserId, MobileNotificationMessageRole.Student | MobileNotificationMessageRole.Tutelary, notificationType, MobileNotificationMessageSource.Kreta, MobileNotificationMessageDestination.RoleGroup, itemId, message, title, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send message asynchronously
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="instituteUserId">Institute user id</param>
|
||||
/// <param name="itemId">Item id</param>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="notificationType">Notification type</param>
|
||||
public static async Task PostStudentNotificationAsync(string instituteCode, int instituteUserId, MobileNotificationMessageType notificationType, int itemId, string message)
|
||||
{
|
||||
await DependencyContainer.Instance.GetInstance<MobileNotificationMessageClient>().PostAsync(new MobileNotificationMessage(instituteCode, instituteUserId, MobileNotificationMessageRole.Student | MobileNotificationMessageRole.Tutelary, notificationType, MobileNotificationMessageSource.Kreta, MobileNotificationMessageDestination.RoleGroup, itemId, message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bulk send messages asynchronously
|
||||
/// </summary>
|
||||
/// <param name="messages">Üzenetek</param>
|
||||
public static async Task PostStudentNotificationAsync(MobileNotificationMessage[] messages)
|
||||
{
|
||||
await DependencyContainer.Instance.GetInstance<MobileNotificationMessageClient>().PostAsync(messages);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send message
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="instituteUserId">Institute user id</param>
|
||||
/// <param name="itemId">Item id</param>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="notificationType">Notification type</param>
|
||||
/// <remarks>We wrap calls into a task to avoid callbacks to current http syncronization context (because hosting thread may be destructed)</remarks>
|
||||
public static void PostStudentNotification(string instituteCode, int instituteUserId, MobileNotificationMessageType notificationType, int itemId, string message)
|
||||
{
|
||||
DependencyContainer.Instance.GetInstance<MobileNotificationMessageClient>().Post(new MobileNotificationMessage(instituteCode, instituteUserId, MobileNotificationMessageRole.Student | MobileNotificationMessageRole.Tutelary, notificationType, MobileNotificationMessageSource.Kreta, MobileNotificationMessageDestination.RoleGroup, itemId, message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send message
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="instituteUserId">Institute user id</param>
|
||||
/// <param name="itemId">Item id</param>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="notificationType">Notification type
|
||||
/// <list type="bullet">
|
||||
/// <item>
|
||||
/// <term>2</term>
|
||||
/// <description>Evaluation</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>4</term>
|
||||
/// <description>Absence</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>8</term>
|
||||
/// <description>Note</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>16</term>
|
||||
/// <description>Message</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>32</term>
|
||||
/// <description>Homework</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>64</term>
|
||||
/// <description>Exam</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </param>
|
||||
/// <remarks>We wrap calls into a task to avoid callbacks to current http syncronization context (because hosting thread may be destructed)</remarks>
|
||||
public static void PostStudentTestNotification(string instituteCode, int instituteUserId, int notificationType, int itemId, string message)
|
||||
{
|
||||
DependencyContainer.Instance.GetInstance<MobileNotificationMessageClient>().Post(new MobileNotificationMessage(instituteCode, instituteUserId, MobileNotificationMessageRole.Student | MobileNotificationMessageRole.Tutelary, (MobileNotificationMessageType)notificationType, MobileNotificationMessageSource.Kreta, MobileNotificationMessageDestination.RoleGroup, itemId, message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bulk send messages
|
||||
/// </summary>
|
||||
/// <param name="messages">Üzenetek</param>
|
||||
public static void PostStudentNotification(MobileNotificationMessage[] messages)
|
||||
{
|
||||
DependencyContainer.Instance.GetInstance<MobileNotificationMessageClient>().Post(messages);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Kreta.Core.MessageBroker.Azure.EventHub.Client.Configuration;
|
||||
using Microsoft.Azure.EventHubs;
|
||||
|
||||
namespace Kreta.MessageBroker.ClientFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Event hub message client factory
|
||||
/// </summary>
|
||||
class AzureEventHubMessageClientFactory : Core.MessageBroker.Azure.EventHub.Client.AzureEventHubMessageClientFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="configuration">Configuration</param>
|
||||
public AzureEventHubMessageClientFactory(IAzureEventHubClientsConfiguration configuration) : base(configuration, RetryPolicy.NoRetry)
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
using Kreta.Core.MessageBroker;
|
||||
|
||||
namespace Kreta.MessageBroker.ClientFactory
|
||||
{
|
||||
internal interface IJsonMessageClientFactory<T> : IMessageClientFactory<T> where T : class
|
||||
{ }
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Kreta.Core.MessageBroker;
|
||||
using Kreta.Core.MessageBroker.Client.Implementations;
|
||||
|
||||
namespace Kreta.MessageBroker.ClientFactory
|
||||
{
|
||||
internal abstract class JsonMessageClientFactory<T> : IJsonMessageClientFactory<T>
|
||||
where T : class
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
private IMessageClientFactory<string> NativeMessageClientFactory { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Public methods]
|
||||
|
||||
public IMessageClient<T> Create(string name)
|
||||
{
|
||||
return new JsonMessageClient<T>(this.NativeMessageClientFactory.Create(name));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Constructors]
|
||||
|
||||
public JsonMessageClientFactory(IMessageClientFactory<string> nativeMessageClientFactory)
|
||||
{
|
||||
this.NativeMessageClientFactory = nativeMessageClientFactory ?? throw new ArgumentNullException(nameof(nativeMessageClientFactory));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using Kreta.Core.MessageBroker;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification;
|
||||
|
||||
namespace Kreta.MessageBroker.ClientFactory
|
||||
{
|
||||
internal class MobileNotificationJsonMessageClientFactory : JsonMessageClientFactory<MobileNotificationMessage>
|
||||
{
|
||||
public MobileNotificationJsonMessageClientFactory(IMessageClientFactory<string> messageClientFactory) : base(messageClientFactory)
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Logging.Serilog.Configuration;
|
||||
using Serilog.Events;
|
||||
using Serilog.Sinks.Elasticsearch;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Elastic search configuration element
|
||||
/// </summary>
|
||||
public class ElasticSearchConfigurationElement : ConfigurationElement, IElasticSearchConfiguration
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Use custom back-off logic
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(UseCustomBackOffLogic), IsRequired = true)]
|
||||
public bool UseCustomBackOffLogic
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)base[nameof(UseCustomBackOffLogic)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URI - s to send log
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(NodeUris), IsRequired = true)]
|
||||
public string NodeUris
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)base[nameof(NodeUris)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elastic search index format
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(IndexFormat), IsRequired = true)]
|
||||
public string IndexFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)base[nameof(IndexFormat)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Minimum log event level
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(MinimumLogEventLevel), IsRequired = false, DefaultValue = LogEventLevel.Information)]
|
||||
public LogEventLevel MinimumLogEventLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LogEventLevel)base[nameof(MinimumLogEventLevel)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The connection timeout when sending bulk operations to elasticsearch in seconds
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(ConnectionTimeoutInSeconds), IsRequired = false)]
|
||||
public int? ConnectionTimeoutInSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(ConnectionTimeoutInSeconds)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Seconds wait between checking event batches
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(WaitBetweenForCheckingEventBatchesInSeconds), IsRequired = false)]
|
||||
public int? WaitBetweenForCheckingEventBatchesInSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(WaitBetweenForCheckingEventBatchesInSeconds)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of events to post in a single batch.
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(BatchPostingLimit), IsRequired = false)]
|
||||
public int? BatchPostingLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(BatchPostingLimit)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auto register template version
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(AutoRegisterTemplateVersion), IsRequired = false)]
|
||||
public AutoRegisterTemplateVersion? AutoRegisterTemplateVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (AutoRegisterTemplateVersion?)base[nameof(AutoRegisterTemplateVersion)];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Azure.EventHub.Client.Configuration;
|
||||
using Validators = Kreta.Core.Configuration.Validators;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
public class EventHubClientConfigurationElement : ConfigurationElement, IAzureEventHubClientConfiguration
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Event hub name
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(Name), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MaxLength = Constants.Azure.EventHub.NameMaximumLength)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(Name)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event hub entity connection string
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(ConnectionString), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MaxLength = Constants.Azure.EventHub.ConnectionStringMaximumLength)]
|
||||
public string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(ConnectionString)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event hub entity path
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(EntityPath), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MaxLength = Constants.Azure.EventHub.EntityPathMaximumLength)]
|
||||
public string EntityPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(EntityPath)];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Azure.EventHub.Client.Configuration;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
public class EventHubClientConfigurationElementCollection : ConfigurationElementCollection, IEnumerable<IAzureEventHubClientConfiguration>
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Collection type
|
||||
/// </summary>
|
||||
public override ConfigurationElementCollectionType CollectionType
|
||||
{
|
||||
get { return ConfigurationElementCollectionType.BasicMap; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get element name
|
||||
/// </summary>
|
||||
protected override string ElementName
|
||||
{
|
||||
get { return "EventHub"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Private/Protected Methods]
|
||||
|
||||
/// <summary>
|
||||
/// Create new element
|
||||
/// </summary>
|
||||
/// <returns>Configuration element</returns>
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new EventHubClientConfigurationElement();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get element key
|
||||
/// </summary>
|
||||
/// <param name="element">Element</param>
|
||||
/// <returns>Element key</returns>
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((EventHubClientConfigurationElement)element).Name;
|
||||
}
|
||||
|
||||
IEnumerator<IAzureEventHubClientConfiguration> IEnumerable<IAzureEventHubClientConfiguration>.GetEnumerator()
|
||||
{
|
||||
var enumerator = base.GetEnumerator();
|
||||
|
||||
var eventHubClientConfiguration = new List<IAzureEventHubClientConfiguration>();
|
||||
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
eventHubClientConfiguration.Add((IAzureEventHubClientConfiguration)enumerator.Current);
|
||||
}
|
||||
|
||||
return eventHubClientConfiguration.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Notification configuration section
|
||||
/// </summary>
|
||||
interface IMessageBrokerConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Clients
|
||||
/// </summary>
|
||||
MessageClientConfigurationElementCollection Clients { get; }
|
||||
}
|
||||
}
|
8
Kreta.MessageBroker/Configuration/LoggerType.cs
Normal file
8
Kreta.MessageBroker/Configuration/LoggerType.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
public enum LoggerType
|
||||
{
|
||||
Log4Net,
|
||||
Serilog
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Azure.EventHub.Client.Configuration;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Message client configuration section
|
||||
/// </summary>
|
||||
public class MessageBrokerConfigurationSection : ConfigurationSection, IMessageBrokerConfiguration, IAzureEventHubClientsConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of section
|
||||
/// </summary>
|
||||
const string SectionName = "MessageBroker";
|
||||
|
||||
/// <summary>
|
||||
/// The instance
|
||||
/// </summary>
|
||||
static Lazy<MessageBrokerConfigurationSection> instance;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The instance.
|
||||
/// </value>
|
||||
public static MessageBrokerConfigurationSection Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance.Value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clients
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(Clients))]
|
||||
[ConfigurationCollection(typeof(MessageClientConfigurationElement))]
|
||||
public MessageClientConfigurationElementCollection Clients
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MessageClientConfigurationElementCollection)base[nameof(Clients)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clients
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(EventHubs))]
|
||||
[ConfigurationCollection(typeof(EventHubClientConfigurationElement))]
|
||||
public EventHubClientConfigurationElementCollection EventHubs
|
||||
{
|
||||
get
|
||||
{
|
||||
return (EventHubClientConfigurationElementCollection)base[nameof(EventHubs)];
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<IAzureEventHubClientConfiguration> IAzureEventHubClientsConfiguration.EventHubs => this.EventHubs;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MessageBrokerConfigurationSection"/> class.
|
||||
/// </summary>
|
||||
static MessageBrokerConfigurationSection()
|
||||
{
|
||||
instance = new Lazy<MessageBrokerConfigurationSection>(() =>
|
||||
{
|
||||
var section = (MessageBrokerConfigurationSection)ConfigurationManager.GetSection(SectionName);
|
||||
|
||||
if (section == null)
|
||||
{
|
||||
throw new ConfigurationErrorsException($"{SectionName} configuration section was not found");
|
||||
}
|
||||
|
||||
return section;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Configuration.IntegratedMessageClient;
|
||||
using Validators = Kreta.Core.Configuration.Validators;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Message client configuration element
|
||||
/// </summary>
|
||||
class MessageClientConfigurationElement : ConfigurationElement, IIntegratedMessageClientConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Element name
|
||||
/// </summary>
|
||||
public const string ElementName = "Client";
|
||||
|
||||
/// <summary>
|
||||
/// Client name
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(Name), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MaxLength = 128)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(Name)];
|
||||
}
|
||||
}
|
||||
|
||||
string IIntegratedMessageClientConfiguration.EndpointClientName => this.Name;
|
||||
|
||||
/// <summary>
|
||||
/// Message signature key
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(MessageSignatureKey), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MinLength = 32, MaxLength = 128)]
|
||||
public string MessageSignatureKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(MessageSignatureKey)];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(QueueSize), DefaultValue = 0)]
|
||||
public int QueueSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this[nameof(QueueSize)];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(ClientPoolSize), DefaultValue = 8)]
|
||||
[Validators.IntegerValidator(MinValue = 1)]
|
||||
public int ClientPoolSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this[nameof(ClientPoolSize)];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(CreateNewClientAfterErrorsCount), DefaultValue = 20)]
|
||||
[Validators.IntegerValidator(MinValue = 3)]
|
||||
public int CreateNewClientAfterErrorsCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this[nameof(CreateNewClientAfterErrorsCount)];
|
||||
}
|
||||
}
|
||||
|
||||
int? IIntegratedMessageClientConfiguration.CreateNewClientAfterErrorsCount => this.CreateNewClientAfterErrorsCount == 0 ? (int?)null : this.CreateNewClientAfterErrorsCount;
|
||||
|
||||
/// <summary>
|
||||
/// Enable logging
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(EnableLogging), IsRequired = true)]
|
||||
public bool EnableLogging
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[nameof(EnableLogging)];
|
||||
}
|
||||
}
|
||||
|
||||
bool IIntegratedMessageClientConfiguration.IsLoggingEnabled => this.EnableLogging;
|
||||
|
||||
[ConfigurationProperty(nameof(LoggerType), DefaultValue = LoggerType.Log4Net)]
|
||||
public LoggerType LoggerType
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LoggerType)this[nameof(LoggerType)];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(SerilogLogger))]
|
||||
public SerilogConfigurationElement SerilogLogger
|
||||
{
|
||||
get
|
||||
{
|
||||
return (SerilogConfigurationElement)this[nameof(SerilogLogger)];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(CalculateBackOffTimeSpan), DefaultValue = true)]
|
||||
public bool CalculateBackOffTimeSpan
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[nameof(CalculateBackOffTimeSpan)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Message client configuration element collection
|
||||
/// </summary>
|
||||
public class MessageClientConfigurationElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// Collection type
|
||||
/// </summary>
|
||||
public override ConfigurationElementCollectionType CollectionType
|
||||
{
|
||||
get { return ConfigurationElementCollectionType.BasicMap; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new element
|
||||
/// </summary>
|
||||
/// <returns>Configuration element</returns>
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new MessageClientConfigurationElement();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get element key
|
||||
/// </summary>
|
||||
/// <param name="element">Element</param>
|
||||
/// <returns>Element key</returns>
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((MessageClientConfigurationElement)element).Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get element name
|
||||
/// </summary>
|
||||
protected override string ElementName
|
||||
{
|
||||
get { return MessageClientConfigurationElement.ElementName; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Logging.Serilog.Configuration;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Serilog - Elastic search konfiguráció
|
||||
/// </summary>
|
||||
public class SerilogConfigurationElement : ConfigurationElement, ISerilogConfiguration
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Lossy buffer count
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(LossyBufferSize), IsRequired = true)]
|
||||
public int LossyBufferSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)base[nameof(LossyBufferSize)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serilog loggers
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(ElasticSearch), IsRequired = false)]
|
||||
public ElasticSearchConfigurationElement ElasticSearch
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ElasticSearchConfigurationElement)base[nameof(ElasticSearch)];
|
||||
}
|
||||
}
|
||||
|
||||
IElasticSearchConfiguration ISerilogConfiguration.ElasticSearch
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ElasticSearch;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Protected methods]
|
||||
|
||||
/// <summary>
|
||||
/// Custom validations
|
||||
/// </summary>
|
||||
protected override void PostDeserialize()
|
||||
{
|
||||
if (!this.ElasticSearch.ElementInformation.IsPresent)
|
||||
{
|
||||
throw new ConfigurationErrorsException($"At least one logger sink must be defined. (e.g:{nameof(ElasticSearch)})");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
51
Kreta.MessageBroker/Constants.cs
Normal file
51
Kreta.MessageBroker/Constants.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
namespace Kreta.MessageBroker
|
||||
{
|
||||
/// <summary>
|
||||
/// Constants
|
||||
/// </summary>
|
||||
static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Notification message client
|
||||
/// </summary>
|
||||
public static class MobileNotificationMessageClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Logger name
|
||||
/// </summary>
|
||||
public const string LoggerName = "MobileNotificationMessageLogger";
|
||||
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
public const string Name = "StudentMobileNotification";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Azure
|
||||
/// </summary>
|
||||
internal static class Azure
|
||||
{
|
||||
/// <summary>
|
||||
/// Event hub
|
||||
/// </summary>
|
||||
internal static class EventHub
|
||||
{
|
||||
/// <summary>
|
||||
/// Name maximum length
|
||||
/// </summary>
|
||||
public const int NameMaximumLength = 64;
|
||||
|
||||
/// <summary>
|
||||
/// Connection string maximum length
|
||||
/// </summary>
|
||||
public const int ConnectionStringMaximumLength = 256;
|
||||
|
||||
/// <summary>
|
||||
/// Event hub entity path maximum length
|
||||
/// </summary>
|
||||
public const int EntityPathMaximumLength = 256;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
52
Kreta.MessageBroker/DependencyContainer.cs
Normal file
52
Kreta.MessageBroker/DependencyContainer.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using Kreta.Core.IoC;
|
||||
using Kreta.Core.MessageBroker;
|
||||
using Kreta.Core.MessageBroker.Azure.EventHub.Client.Configuration;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification;
|
||||
using Kreta.MessageBroker.Client.MobileNotification;
|
||||
using Kreta.MessageBroker.ClientFactory;
|
||||
using Kreta.MessageBroker.Configuration;
|
||||
using Kreta.MessageBroker.Propetries;
|
||||
using Kreta.MessageBroker.TraceLog;
|
||||
|
||||
namespace Kreta.MessageBroker
|
||||
{
|
||||
/// <summary>
|
||||
/// Dependency resolver of current layer
|
||||
/// </summary>
|
||||
class DependencyContainer : Core.IoC.DependencyContainer
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static IDependencyResolver Instance
|
||||
{
|
||||
get { return GetResolver(MessageBrokerLayer.Instance); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Private/Protected Methods]
|
||||
|
||||
/// <summary>
|
||||
/// Initialize
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
RegisterSingleton<IMessageBrokerConfiguration>(MessageBrokerConfigurationSection.Instance);
|
||||
RegisterSingleton<IAzureEventHubClientsConfiguration>(MessageBrokerConfigurationSection.Instance);
|
||||
|
||||
RegisterSingleton<IMessageClientFactory<string>, ClientFactory.AzureEventHubMessageClientFactory>();
|
||||
RegisterSingleton<IJsonMessageClientFactory<MobileNotificationMessage>, MobileNotificationJsonMessageClientFactory>();
|
||||
|
||||
RegisterSingleton<ITraceMessageClient, TraceMessageClient>();
|
||||
RegisterSingleton<ISerilogTraceLogger, SerilogTraceLogger>();
|
||||
|
||||
RegisterSingleton<MobileNotificationMessageClient>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
232
Kreta.MessageBroker/Kreta.MessageBroker.csproj
Normal file
232
Kreta.MessageBroker/Kreta.MessageBroker.csproj
Normal file
|
@ -0,0 +1,232 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{28CC34C7-0A89-4A33-BA89-8952FFEB2F9E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.MessageBroker</RootNamespace>
|
||||
<AssemblyName>Kreta.MessageBroker</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Elasticsearch.Net, Version=7.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Elasticsearch.Net.7.0.0\lib\net461\Elasticsearch.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.Configuration.1.3.20119.1\lib\net452\Kreta.Core.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.IoC, Version=1.2.63491.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.IoC.1.2.63491\lib\net452\Kreta.Core.IoC.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker.Azure.EventHub.Client, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.Azure.EventHub.Client.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.Azure.EventHub.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker.Contract, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.Contract.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.Contract.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker.Logging.Log4Net, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.Logging.Log4Net.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.Logging.Log4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker.Logging.Serilog, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.Logging.Serilog.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.Logging.Serilog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Azure.Amqp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Azure.Amqp.2.4.11\lib\net45\Microsoft.Azure.Amqp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Azure.EventHubs, Version=4.3.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Azure.EventHubs.4.3.2\lib\netstandard2.0\Microsoft.Azure.EventHubs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Azure.Services.AppAuthentication, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\lib\net452\Microsoft.Azure.Services.AppAuthentication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.14.2.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.14.2\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.14.2.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.14.2\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.5.4.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Logging.5.4.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.4.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.2.8.0\lib\net46\Serilog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Formatting.Compact, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Formatting.Elasticsearch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.Formatting.Elasticsearch.8.0.0\lib\net45\Serilog.Formatting.Elasticsearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.Elasticsearch, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.Sinks.Elasticsearch.8.0.0\lib\net461\Serilog.Sinks.Elasticsearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.File, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.PeriodicBatching, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Serilog.Sinks.PeriodicBatching.2.1.1\lib\net45\Serilog.Sinks.PeriodicBatching.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SimpleInjector, Version=4.0.11.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SimpleInjector.4.0.11\lib\net45\SimpleInjector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.4.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Net.WebSockets.4.0.0\lib\net46\System.Net.WebSockets.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets.Client, Version=4.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Net.WebSockets.Client.4.0.2\lib\net46\System.Net.WebSockets.Client.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.TypeExtensions, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.TypeExtensions.4.5.1\lib\net461\System.Reflection.TypeExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ClientFactory\AzureEventHubMessageClientFactory.cs" />
|
||||
<Compile Include="ClientFactory\IJsonMessageClientFactory.cs" />
|
||||
<Compile Include="ClientFactory\JsonMessageClientFactory.cs" />
|
||||
<Compile Include="ClientFactory\MobileNotificationJsonMessageClientFactory.cs" />
|
||||
<Compile Include="Client\MessageClient.cs" />
|
||||
<Compile Include="Configuration\ElasticSearchConfigurationElement.cs" />
|
||||
<Compile Include="Configuration\EventHubClientConfigurationElement.cs" />
|
||||
<Compile Include="Configuration\EventHubClientConfigurationElementCollection.cs" />
|
||||
<Compile Include="Configuration\IMessageBrokerConfiguration.cs" />
|
||||
<Compile Include="Configuration\LoggerType.cs" />
|
||||
<Compile Include="Configuration\MessageBrokerConfigurationSection.cs" />
|
||||
<Compile Include="Configuration\MessageClientConfigurationElement.cs" />
|
||||
<Compile Include="Configuration\MessageClientConfigurationElementCollection.cs" />
|
||||
<Compile Include="Configuration\SerilogConfigurationElement.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Client\MobileNotification\MobileNotificationMessageClient.cs" />
|
||||
<Compile Include="Properties\MessageBrokerLayer.cs" />
|
||||
<Compile Include="DependencyContainer.cs" />
|
||||
<Compile Include="Client\MobileNotification\MobileNotificationMessageHelper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TraceLog\ISerilogTraceLogger.cs" />
|
||||
<Compile Include="TraceLog\ITraceMessageClient.cs" />
|
||||
<Compile Include="TraceLog\SerilogTraceLogger.cs" />
|
||||
<Compile Include="TraceLog\TraceMessageClient.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\build\Microsoft.Azure.Services.AppAuthentication.targets" Condition="Exists('..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\build\Microsoft.Azure.Services.AppAuthentication.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\build\Microsoft.Azure.Services.AppAuthentication.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\build\Microsoft.Azure.Services.AppAuthentication.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
4
Kreta.MessageBroker/Properties/AssemblyInfo.cs
Normal file
4
Kreta.MessageBroker/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,4 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Kreta.MessageBroker.Tests")]
|
||||
|
44
Kreta.MessageBroker/Properties/MessageBrokerLayer.cs
Normal file
44
Kreta.MessageBroker/Properties/MessageBrokerLayer.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Kreta.Core.IoC;
|
||||
|
||||
namespace Kreta.MessageBroker.Propetries
|
||||
{
|
||||
/// <summary>
|
||||
/// Message client layer
|
||||
/// </summary>
|
||||
public class MessageBrokerLayer : ApplicationLayer
|
||||
{
|
||||
#region [Fields]
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
static Lazy<MessageBrokerLayer> instance;
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static MessageBrokerLayer Instance
|
||||
{
|
||||
get { return instance.Value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Constructor(s)]
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
static MessageBrokerLayer()
|
||||
{
|
||||
instance = new Lazy<MessageBrokerLayer>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
5
Kreta.MessageBroker/TraceLog/ISerilogTraceLogger.cs
Normal file
5
Kreta.MessageBroker/TraceLog/ISerilogTraceLogger.cs
Normal file
|
@ -0,0 +1,5 @@
|
|||
namespace Kreta.MessageBroker.TraceLog
|
||||
{
|
||||
internal interface ISerilogTraceLogger : Core.MessageBroker.Logging.Serilog.ITraceLogger
|
||||
{ }
|
||||
}
|
7
Kreta.MessageBroker/TraceLog/ITraceMessageClient.cs
Normal file
7
Kreta.MessageBroker/TraceLog/ITraceMessageClient.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
using Kreta.Core.MessageBroker;
|
||||
|
||||
namespace Kreta.MessageBroker.TraceLog
|
||||
{
|
||||
public interface ITraceMessageClient : IMessageClient<string>
|
||||
{ }
|
||||
}
|
11
Kreta.MessageBroker/TraceLog/SerilogTraceLogger.cs
Normal file
11
Kreta.MessageBroker/TraceLog/SerilogTraceLogger.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
namespace Kreta.MessageBroker.TraceLog
|
||||
{
|
||||
internal class SerilogTraceLogger : ISerilogTraceLogger
|
||||
{
|
||||
public void Log(string message)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine(message);
|
||||
}
|
||||
}
|
||||
}
|
14
Kreta.MessageBroker/TraceLog/TraceMessageClient.cs
Normal file
14
Kreta.MessageBroker/TraceLog/TraceMessageClient.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace Kreta.MessageBroker.TraceLog
|
||||
{
|
||||
internal class TraceMessageClient : ITraceMessageClient
|
||||
{
|
||||
public async Task PostAsync(string message)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine(message);
|
||||
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
19
Kreta.MessageBroker/app.config
Normal file
19
Kreta.MessageBroker/app.config
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.4.0.0" newVersion="5.4.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
42
Kreta.MessageBroker/packages.config
Normal file
42
Kreta.MessageBroker/packages.config
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Elasticsearch.Net" version="7.0.0" targetFramework="net48" />
|
||||
<package id="Kreta.Core.Configuration" version="1.3.20119.1" targetFramework="net48" />
|
||||
<package id="Kreta.Core.IoC" version="1.2.63491" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker.Azure.EventHub.Client" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker.Contract" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker.Logging.Log4Net" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker.Logging.Serilog" version="3.0.8" targetFramework="net48" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.688" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Microsoft.Azure.Amqp" version="2.4.11" targetFramework="net48" />
|
||||
<package id="Microsoft.Azure.EventHubs" version="4.3.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Azure.Services.AppAuthentication" version="1.0.3" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.14.2" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.4.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="5.4.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="5.4.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="Serilog" version="2.8.0" targetFramework="net48" />
|
||||
<package id="Serilog.Formatting.Compact" version="1.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Formatting.Elasticsearch" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.Elasticsearch" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.File" version="4.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.PeriodicBatching" version="2.1.1" targetFramework="net48" />
|
||||
<package id="SimpleInjector" version="4.0.11" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="5.4.0" targetFramework="net48" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
||||
<package id="System.Net.WebSockets" version="4.0.0" targetFramework="net48" />
|
||||
<package id="System.Net.WebSockets.Client" version="4.0.2" targetFramework="net48" />
|
||||
<package id="System.Reflection.TypeExtensions" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue