Skip to content

Commit

Permalink
add message mapper interface
Browse files Browse the repository at this point in the history
  • Loading branch information
2code-it committed Apr 14, 2024
1 parent 36ff86b commit 4cac42c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/Code2.Services.Syslog/IMessageMapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Code2.Services.Syslog
{
public interface IMessageMapper<T>
{
byte[] GetBytes(object message);
T GetMessage(byte[] bytes);
}
}
2 changes: 1 addition & 1 deletion src/Code2.Services.Syslog/MessageMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Code2.Services.Syslog
{
public class MessageMapper<T>
public class MessageMapper<T> : IMessageMapper<T>
{
public MessageMapper() : this(new MessageReaderFactory()) { }
public MessageMapper(IMessageReaderFactory messageReaderFactory)
Expand Down

0 comments on commit 4cac42c

Please sign in to comment.