Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiasneves committed Sep 12, 2019
1 parent fa559d0 commit 91550ff
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/sapher/Configuration/ISapherConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public interface ISapherConfigurator
/// <param name="name">Step name</param>
/// <param name="configure">Configuration action for the Step creation</param>
/// <returns>Updated ISapherConfigurator for fluent configuration</returns>
ISapherConfigurator AddStep<T>(string name, Action<ISapherStepConfigurator> configure = null)
ISapherConfigurator AddStep<T>(string name, Action<ISapherStepConfigurator> configure = null)
where T : class, IHandlesInput;

/// <summary>
/// Defines an implementation of ILogger to be used by Sapher for logging.
/// Defines an implementation of ILogger to be used by Sapher for logging.
/// If not defined, Sapher will not log anything.
/// This is used as singleton.
/// </summary>
Expand All @@ -31,7 +31,7 @@ ISapherConfigurator AddStep<T>(string name, Action<ISapherStepConfigurator> conf
ISapherConfigurator AddLogger<T>(T instance = null) where T : class, ILogger;

/// <summary>
/// Defines an implementation of ISapherDataRepository to be used by Sapher for persistence.
/// Defines an implementation of ISapherDataRepository to be used by Sapher for persistence.
/// If not defined, Sapher will use In Memory persistence.
/// This is used as singleton.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public ISapherConfigurator AddStep<T>(
}

/// <summary>
/// Defines an implementation of ILogger to be used by Sapher for logging.
/// Defines an implementation of ILogger to be used by Sapher for logging.
/// If not defined, Sapher will not log anything.
/// This is used as singleton.
/// </summary>
Expand All @@ -112,7 +112,7 @@ public ISapherConfigurator AddLogger<T>(T instance = null) where T : class, ILog
}

/// <summary>
/// Defines an implementation of ISapherDataRepository to be used by Sapher for persistence.
/// Defines an implementation of ISapherDataRepository to be used by Sapher for persistence.
/// If not defined, Sapher will use In Memory persistence.
/// This is used as singleton.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions src/sapher/Dtos/MessageSlip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public class MessageSlip
/// <param name="conversationId">The conversationId.
///Sshould be the messageId of the message that originated this message.
///If the message is the first message of the distributed transaction, this should be left null</param>
/// <param name="correlationId">The unique identifier of a distributed transaction.
/// Should be the same for all messages of a single distributed transaction.
/// <param name="correlationId">The unique identifier of a distributed transaction.
/// Should be the same for all messages of a single distributed transaction.
/// If no value is provided, a new Guid will be generated.</param>
public MessageSlip(string messageId = null, string conversationId = null, string correlationId = null)
{
Expand Down
1 change: 0 additions & 1 deletion src/sapher/Handlers/IHandlesInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ public interface IHandlesInput<in T>
/// </summary>
public interface IHandlesInput
{

}
}
3 changes: 1 addition & 2 deletions src/sapher/Handlers/IHandlesResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IHandlesResponse<in T>
/// </summary>
/// <param name="message">Received response message</param>
/// <param name="messageSlip">MessageSlip of the message, containing its identifiers</param>
/// <param name="previouslyPersistedData">Data provided to be persisted in the distributed transaction step input execution
/// <param name="previouslyPersistedData">Data provided to be persisted in the distributed transaction step input execution
/// - provided by the InputResult returned by the InputHandler's execute method</param>
/// <returns>ResponseResult instance, containing the result of the execution</returns>
Task<ResponseResult> Execute(
Expand All @@ -31,6 +31,5 @@ Task<ResponseResult> Execute(
/// </summary>
public interface IHandlesResponse
{

}
}
4 changes: 2 additions & 2 deletions src/sapher/Logger/LogEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public class LogEntry
/// <param name="message">The message of the LogEntry</param>
/// <param name="exception">The exception of the LogEntry. This is optional.</param>
/// <param name="additionalData">Additional data to add to the LogEntry. This is optional.</param>
/// <exception cref = "System.ArgumentNullException"><paramref name="message"/> is null</exception>
/// <exception cref = "System.ArgumentException"><paramref name="message"/> is empty or whitespace</exception>
/// <exception cref = "System.ArgumentNullException"><paramref name="message"/> is null</exception>
/// <exception cref = "System.ArgumentException"><paramref name="message"/> is empty or whitespace</exception>
public LogEntry(
LoggingEventType severity,
string message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using TypeAdapters;

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

public class InMemorySapherRepository : ISapherDataRepository
{
private readonly List<Model.SapherStepData> stepData = new List<Model.SapherStepData>();
Expand Down Expand Up @@ -78,4 +79,5 @@ private Model.SapherStepData LoadFromId(string id)
StringComparison.InvariantCultureIgnoreCase));
}
}

#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
4 changes: 2 additions & 2 deletions src/sapher/SapherStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
using Configuration;
using Dtos;
using Exceptions;
using Logger.Extensions;
using Utils;
using Handlers;
using Logger;
using Logger.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Persistence;
using Utils;

internal class SapherStep : ISapherStep
{
Expand Down
2 changes: 1 addition & 1 deletion src/sapher/Sapherman.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
using Configuration;
using Dtos;
using Exceptions;
using Persistence;
using Logger;
using Logger.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Persistence;
using Polly;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Sapher.Tests/Sapher.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Sapher\Sapher.csproj" />
<ProjectReference Include="..\..\..\src\sapher\Sapher.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/unit/Sapher.Tests/SapherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public async Task GetStepInstance_RetrievesInstanceValidInfo()
};

var inputMessageSlip = Dtos.MessageSlip.GenerateNewMessageSlip();
const string expectedStepName = "TestInputWithResponses";
const string expectedStepName = "TestInputWithResponses";

await this.sapher
.DeliverMessage(
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Sapher.Tests/TestLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[ExcludeFromCodeCoverage]
internal class TestLogger : ILogger
{
public static LogEntry ReceivedLogEntry{ get; set; }
public static LogEntry ReceivedLogEntry { get; set; }

public void Log(LogEntry entry)
{
Expand Down

0 comments on commit 91550ff

Please sign in to comment.