-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathCefSender.cs
50 lines (42 loc) · 1.2 KB
/
CefSender.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Collections.Generic;
using SyslogNet.Client;
using SyslogNet.Client.Serialization;
using SyslogNet.Client.Transport;
namespace ViennaNET.ArcSight
{
internal class CefSender : ISyslogMessageSender, ICefSender
{
private readonly ISyslogMessageSender _syslogMessageSender;
public CefSender(ISyslogMessageSender syslogMessageSender)
{
_syslogMessageSender = syslogMessageSender;
}
public void Send(CefMessage message, CefMessageSerializer serializer)
{
Send(serializer.Serialize(message), serializer);
}
public void Send(IEnumerable<CefMessage> messages, CefMessageSerializer serializer)
{
foreach (var message in messages)
{
Send(message, serializer);
}
}
public void Dispose()
{
_syslogMessageSender.Dispose();
}
public void Reconnect()
{
_syslogMessageSender.Reconnect();
}
public void Send(SyslogMessage message, ISyslogMessageSerializer serializer)
{
_syslogMessageSender.Send(message, serializer);
}
public void Send(IEnumerable<SyslogMessage> messages, ISyslogMessageSerializer serializer)
{
_syslogMessageSender.Send(messages, serializer);
}
}
}