Skip to content

Commit

Permalink
Cleanup and adding nuspec file within root project (internal)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrovat committed Mar 6, 2021
1 parent 2e29729 commit bbd08dc
Show file tree
Hide file tree
Showing 43 changed files with 146 additions and 132 deletions.
File renamed without changes.
Binary file modified build/tools/nuget.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Sportradar.MTS.SDK/API/Internal/JsonDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Sportradar.MTS.SDK.API.Internal
{
/// <summary>
/// A <see cref="IDeserializer{T}" /> implementation which uses <see cref="System.Runtime.Serialization.Json.DataContractJsonSerializer" /> property to deserialize JSON strings
/// A <see cref="IDeserializer{T}" /> implementation which uses <see cref="DataContractJsonSerializer" /> property to deserialize JSON strings
/// </summary>
/// <typeparam name="T">Specifies the type that can be deserialized</typeparam>
internal class JsonDeserializer<T> : IDeserializer<T> where T : class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
namespace Sportradar.MTS.SDK.API.Internal.RabbitMq
{
/// <summary>
/// Represents a factory used to construct <see cref="RabbitMQ.Client.IModel"/> instances representing channels to the broker
/// Represents a factory used to construct <see cref="IModel"/> instances representing channels to the broker
/// </summary>
/// <seealso cref="IChannelFactory" />
/// <seealso cref="System.IDisposable" />
/// <seealso cref="IDisposable" />
internal class ChannelFactory : IChannelFactory, IDisposable
{
private static readonly ILog ExecutionLog = SdkLoggerFactory.GetLogger(typeof(ChannelFactory));

/// <summary>
/// The <see cref="RabbitMQ.Client.IConnectionFactory"/> used to construct connections to the broker
/// The <see cref="IConnectionFactory"/> used to construct connections to the broker
/// </summary>
private readonly IConnectionFactory _connectionFactory;

Expand All @@ -35,7 +35,7 @@ internal class ChannelFactory : IChannelFactory, IDisposable
private readonly object _lock = new object();

/// <summary>
/// The <see cref="RabbitMQ.Client.IConnection"/> representing connection to the broker
/// The <see cref="IConnection"/> representing connection to the broker
/// </summary>
private IConnection _connection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Sportradar.MTS.SDK.API.Internal.RabbitMq
{
/// <summary>
/// A <see cref="RabbitMQ.Client.IConnectionFactory"/> implementations which properly configures it self before first <see cref="RabbitMQ.Client.IConnection"/> is created
/// A <see cref="IConnectionFactory"/> implementations which properly configures it self before first <see cref="IConnection"/> is created
/// </summary>
internal class ConfiguredConnectionFactory : ConnectionFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Sportradar.MTS.SDK.API.Internal.RabbitMq
/// <summary>
/// Defines a contract for AMPQ message receiver
/// </summary>
/// <seealso cref="Sportradar.MTS.SDK.Common.IOpenable" />
/// <seealso cref="IOpenable" />
internal interface IRabbitMqMessageReceiver : IOpenable
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal class RabbitMqConsumerChannel : IRabbitMqConsumerChannel
private static readonly ILog FeedLog = SdkLoggerFactory.GetLoggerForFeedTraffic(typeof(RabbitMqConsumerChannel));

/// <summary>
/// A <see cref="IChannelFactory"/> used to construct the <see cref="RabbitMQ.Client.IModel"/> representing Rabbit MQ channel
/// A <see cref="IChannelFactory"/> used to construct the <see cref="IModel"/> representing Rabbit MQ channel
/// </summary>
private readonly IChannelFactory _channelFactory;

Expand Down Expand Up @@ -85,7 +85,7 @@ internal class RabbitMqConsumerChannel : IRabbitMqConsumerChannel
/// <summary>
/// Initializes a new instance of the <see cref="RabbitMqConsumerChannel"/> class
/// </summary>
/// <param name="channelFactory">A <see cref="IChannelFactory"/> used to construct the <see cref="RabbitMQ.Client.IModel"/> representing Rabbit MQ channel</param>
/// <param name="channelFactory">A <see cref="IChannelFactory"/> used to construct the <see cref="IModel"/> representing Rabbit MQ channel</param>
/// <param name="mtsChannelSettings"></param>
/// <param name="channelSettings"></param>
public RabbitMqConsumerChannel(IChannelFactory channelFactory,
Expand Down Expand Up @@ -131,10 +131,10 @@ private void OnTimerElapsed(object sender, EventArgs e)
}

/// <summary>
/// Handles the <see cref="RabbitMQ.Client.Events.EventingBasicConsumer.Received"/> event
/// Handles the <see cref="EventingBasicConsumer.Received"/> event
/// </summary>
/// <param name="sender">The <see cref="object"/> representation of the instance raising the event</param>
/// <param name="basicDeliverEventArgs">The <see cref="RabbitMQ.Client.Events.BasicDeliverEventArgs"/> instance containing the event data</param>
/// <param name="basicDeliverEventArgs">The <see cref="BasicDeliverEventArgs"/> instance containing the event data</param>
private void OnDataReceived(object sender, BasicDeliverEventArgs basicDeliverEventArgs)
{
var correlationId = basicDeliverEventArgs?.BasicProperties?.CorrelationId ?? string.Empty;
Expand Down Expand Up @@ -352,7 +352,7 @@ private void CreateAndOpenConsumerChannel()
/// <summary>
/// Closes the current channel
/// </summary>
/// <exception cref="System.InvalidOperationException">The instance is already closed</exception>
/// <exception cref="InvalidOperationException">The instance is already closed</exception>
public void Close()
{
if (Interlocked.CompareExchange(ref _isOpened, 0, 1) != 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public RabbitMqMessageReceiver(IRabbitMqConsumerChannel channel, TicketResponseT
/// Handles the message received event
/// </summary>
/// <param name="sender">The <see cref="object" /> representation of the event sender</param>
/// <param name="eventArgs">A <see cref="RabbitMQ.Client.Events.BasicDeliverEventArgs" /> containing event information</param>
/// <param name="eventArgs">A <see cref="BasicDeliverEventArgs" /> containing event information</param>
private void Consumer_OnMessageReceived(object sender, BasicDeliverEventArgs eventArgs)
{
if (eventArgs?.Body == null || !eventArgs.Body.Any())
Expand Down Expand Up @@ -216,7 +216,7 @@ public void RegisterHealthCheck()
}

/// <summary>
/// Starts the health check and returns <see cref="Metrics.HealthCheckResult" />
/// Starts the health check and returns <see cref="HealthCheckResult" />
/// </summary>
/// <returns>HealthCheckResult</returns>
public HealthCheckResult StartHealthCheck()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal class RabbitMqPublisherChannel : IRabbitMqPublisherChannel
private static readonly ILog FeedLog = SdkLoggerFactory.GetLoggerForFeedTraffic(typeof(RabbitMqPublisherChannel));

/// <summary>
/// A <see cref="IChannelFactory" /> used to construct the <see cref="RabbitMQ.Client.IModel" /> representing Rabbit MQ channel
/// A <see cref="IChannelFactory" /> used to construct the <see cref="IModel" /> representing Rabbit MQ channel
/// </summary>
private readonly IChannelFactory _channelFactory;

Expand Down Expand Up @@ -112,7 +112,7 @@ internal class RabbitMqPublisherChannel : IRabbitMqPublisherChannel
/// <summary>
/// Initializes a new instance of the <see cref="RabbitMqConsumerChannel" /> class
/// </summary>
/// <param name="channelFactory">A <see cref="IChannelFactory" /> used to construct the <see cref="RabbitMQ.Client.IModel" /> representing Rabbit MQ channel</param>
/// <param name="channelFactory">A <see cref="IChannelFactory" /> used to construct the <see cref="IModel" /> representing Rabbit MQ channel</param>
/// <param name="mtsChannelSettings">The mts channel settings</param>
/// <param name="channelSettings">The channel settings</param>
/// <param name="connectionStatus">The connection status</param>
Expand Down Expand Up @@ -234,7 +234,7 @@ private void RaiseMessagePublishFailedEvent(IEnumerable<byte> rawData, string co
/// <param name="correlationId">The correlation identifier</param>
/// <param name="replyRoutingKey">The reply routing key</param>
/// <returns>A <see cref="IMqPublishResult" /></returns>
/// <exception cref="System.InvalidOperationException">The instance is closed</exception>
/// <exception cref="InvalidOperationException">The instance is closed</exception>
public IMqPublishResult Publish(string ticketId, byte[] msg, string routingKey, string correlationId, string replyRoutingKey)
{
Guard.Argument(msg, nameof(msg)).NotNull();
Expand Down Expand Up @@ -310,7 +310,7 @@ private IMqPublishResult AddToPublishingQueue(string ticketId, byte[] msg, strin
/// <param name="correlationId">The correlation identifier</param>
/// <param name="replyRoutingKey">The reply routing key</param>
/// <returns>IMqPublishResult</returns>
/// <exception cref="System.InvalidOperationException">The instance is closed</exception>
/// <exception cref="InvalidOperationException">The instance is closed</exception>
private IMqPublishResult PublishMsg(string ticketId, byte[] msg, string routingKey, string correlationId, string replyRoutingKey)
{
try
Expand Down Expand Up @@ -439,7 +439,7 @@ private void ChannelOnModelShutdown(object sender, ShutdownEventArgs e)
/// <summary>
/// Opens the current channel and binds the created queue to provided routing keys
/// </summary>
/// <exception cref="System.InvalidOperationException">The instance is already opened</exception>
/// <exception cref="InvalidOperationException">The instance is already opened</exception>
public void Open()
{
if (Interlocked.Read(ref _isOpened) != 0)
Expand All @@ -455,7 +455,7 @@ public void Open()
/// <summary>
/// Closes the current channel
/// </summary>
/// <exception cref="System.InvalidOperationException">The instance is already closed</exception>
/// <exception cref="InvalidOperationException">The instance is already closed</exception>
public void Close()
{
if (Interlocked.CompareExchange(ref _isOpened, 0, 1) != 1)
Expand Down
24 changes: 12 additions & 12 deletions src/Sportradar.MTS.SDK/API/Internal/SdkUnityBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,18 @@ private static void RegisterRabbitMqTypes(IUnityContainer container, ISdkConfigu
var mtsTicketCashoutResponseChannelSettings = MtsChannelSettings.GetTicketCashoutResponseChannelSettings(rootExchangeName, config.Username, config.NodeId, environment);
var mtsTicketNonSrSettleResponseChannelSettings = MtsChannelSettings.GetTicketNonSrSettleResponseChannelSettings(rootExchangeName, config.Username, config.NodeId, environment);

container.RegisterInstance<IMtsChannelSettings>("TicketChannelSettings", mtsTicketChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketCancelChannelSettings", mtsTicketCancelChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketAckChannelSettings", mtsTicketAckChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketCancelAckChannelSettings", mtsTicketCancelAckChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketReofferCancelChannelSettings", mtsTicketReofferCancelChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketCashoutChannelSettings", mtsTicketCashoutChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketNonSrSettleChannelSettings", mtsTicketNonSrSettleChannelSettings);

container.RegisterInstance<IMtsChannelSettings>("TicketResponseChannelSettings", mtsTicketResponseChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketCancelResponseChannelSettings", mtsTicketCancelResponseChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketCashoutResponseChannelSettings", mtsTicketCashoutResponseChannelSettings);
container.RegisterInstance<IMtsChannelSettings>("TicketNonSrSettleResponseChannelSettings", mtsTicketNonSrSettleResponseChannelSettings);
container.RegisterInstance("TicketChannelSettings", mtsTicketChannelSettings);
container.RegisterInstance("TicketCancelChannelSettings", mtsTicketCancelChannelSettings);
container.RegisterInstance("TicketAckChannelSettings", mtsTicketAckChannelSettings);
container.RegisterInstance("TicketCancelAckChannelSettings", mtsTicketCancelAckChannelSettings);
container.RegisterInstance("TicketReofferCancelChannelSettings", mtsTicketReofferCancelChannelSettings);
container.RegisterInstance("TicketCashoutChannelSettings", mtsTicketCashoutChannelSettings);
container.RegisterInstance("TicketNonSrSettleChannelSettings", mtsTicketNonSrSettleChannelSettings);

container.RegisterInstance("TicketResponseChannelSettings", mtsTicketResponseChannelSettings);
container.RegisterInstance("TicketCancelResponseChannelSettings", mtsTicketCancelResponseChannelSettings);
container.RegisterInstance("TicketCashoutResponseChannelSettings", mtsTicketCashoutResponseChannelSettings);
container.RegisterInstance("TicketNonSrSettleResponseChannelSettings", mtsTicketNonSrSettleResponseChannelSettings);

container.RegisterType<IRabbitMqConsumerChannel, RabbitMqConsumerChannel>(new HierarchicalLifetimeManager());
var ticketResponseConsumerChannel = new RabbitMqConsumerChannel(container.Resolve<IChannelFactory>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void Acknowledge(bool markAccepted, int bookmakerId, int code, string mes
/// Send acknowledgment back to MTS
/// </summary>
/// <param name="markAccepted">if set to <c>true</c> [mark accepted]</param>
/// <exception cref="System.Exception">missing ticket in cache</exception>
/// <exception cref="Exception">missing ticket in cache</exception>
public void Acknowledge(bool markAccepted = true)
{
// acking is not supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void Acknowledge(bool markAccepted, int bookmakerId, int code, string mes
/// Send acknowledgment back to MTS
/// </summary>
/// <param name="markAccepted">if set to <c>true</c> [mark accepted]</param>
/// <exception cref="System.Exception">missing ticket in cache</exception>
/// <exception cref="Exception">missing ticket in cache</exception>
public void Acknowledge(bool markAccepted = true)
{
// acking is not supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public TicketResponse(ITicketSender ticketSender,
/// <param name="bookmakerId">The sender identifier</param>
/// <param name="code">The code</param>
/// <param name="message">The message</param>
/// <exception cref="System.NullReferenceException">Missing TicketSender. Can not be null</exception>
/// <exception cref="NullReferenceException">Missing TicketSender. Can not be null</exception>
public void Acknowledge(bool markAccepted, int bookmakerId, int code, string message)
{
if (_ticketSender == null)
Expand All @@ -162,7 +162,7 @@ public void Acknowledge(bool markAccepted, int bookmakerId, int code, string mes
/// Send acknowledgment back to MTS
/// </summary>
/// <param name="markAccepted">if set to <c>true</c> [mark accepted]</param>
/// <exception cref="System.Exception">missing ticket in cache</exception>
/// <exception cref="Exception">missing ticket in cache</exception>
public void Acknowledge(bool markAccepted = true)
{
var sentTicket = (ITicket) _ticketSender.GetSentTicket(TicketId);
Expand Down
6 changes: 3 additions & 3 deletions src/Sportradar.MTS.SDK/API/MtsSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class MtsSdk : IMtsSdk
private CacheItemPolicy _cacheItemPolicyForTicketsForNonBlockingRequestsCache;

/// <summary>
/// A <see cref="Microsoft.Practices.Unity.IUnityContainer"/> used to resolve
/// A <see cref="IUnityContainer"/> used to resolve
/// </summary>
private readonly IUnityContainer _unityContainer;

Expand Down Expand Up @@ -311,8 +311,8 @@ protected virtual void Dispose(bool disposing)
/// <summary>
/// Opens the current feed
/// </summary>
/// <exception cref="System.ObjectDisposedException">The feed is already disposed</exception>
/// <exception cref="System.InvalidOperationException">The feed is already opened</exception>
/// <exception cref="ObjectDisposedException">The feed is already disposed</exception>
/// <exception cref="InvalidOperationException">The feed is already opened</exception>
/// <exception cref="CommunicationException"> Connection to the message broker failed, Probable Reason={Invalid or expired token}</exception>
public void Open()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Sportradar.MTS.SDK/Common/Internal/IDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDeserializer<T> where T : class
/// </summary>
/// <param name="stream">A <see cref="Stream"/> instance containing data to be deserialized </param>
/// <returns>The <code>data</code> deserialized to instance of T</returns>
/// <exception cref="Sportradar.MTS.SDK.Common.Exceptions.DeserializationException">The deserialization failed</exception>
/// <exception cref="Exceptions.DeserializationException">The deserialization failed</exception>
T Deserialize(Stream stream);

/// <summary>
Expand All @@ -26,7 +26,7 @@ public interface IDeserializer<T> where T : class
/// <typeparam name="T1">Specifies the type to which to deserialize the data</typeparam>
/// <param name="stream">A <see cref="Stream"/> instance containing data to be deserialized </param>
/// <returns>The <code>data</code> deserialized to instance of T1</returns>
/// <exception cref="Sportradar.MTS.SDK.Common.Exceptions.DeserializationException">The deserialization failed</exception>
/// <exception cref="Exceptions.DeserializationException">The deserialization failed</exception>
T1 Deserialize<T1>(Stream stream) where T1 : T;

/// <summary>
Expand All @@ -35,7 +35,7 @@ public interface IDeserializer<T> where T : class
/// <typeparam name="T1">Specifies the type to which to deserialize the data</typeparam>
/// <param name="input">A (JSON) string text containing data to be deserialized</param>
/// <returns>The <code>data</code> deserialized to instance of T1</returns>
/// <exception cref="Sportradar.MTS.SDK.Common.Exceptions.DeserializationException">The deserialization failed</exception>
/// <exception cref="Exceptions.DeserializationException">The deserialization failed</exception>
T1 Deserialize<T1>(string input) where T1 : T;
}
}
Loading

0 comments on commit bbd08dc

Please sign in to comment.