forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNpgsqlNotificationEventArgs.cs
More file actions
33 lines (29 loc) · 939 Bytes
/
NpgsqlNotificationEventArgs.cs
File metadata and controls
33 lines (29 loc) · 939 Bytes
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
using System;
namespace Npgsql
{
/// <summary>
/// EventArgs class to send Notification parameters.
/// </summary>
public sealed class NpgsqlNotificationEventArgs : EventArgs
{
/// <summary>
/// Process ID of the PostgreSQL backend that sent this notification.
/// </summary>
// ReSharper disable once InconsistentNaming
public int PID { get; }
/// <summary>
/// Condition that triggered that notification.
/// </summary>
public string Condition { get; }
/// <summary>
/// Additional information.
/// </summary>
public string AdditionalInformation { get; }
internal NpgsqlNotificationEventArgs(NpgsqlReadBuffer buf)
{
PID = buf.ReadInt32();
Condition = buf.ReadNullTerminatedString();
AdditionalInformation = buf.ReadNullTerminatedString();
}
}
}