Skip to content

Commit 693c47c

Browse files
committed
Rename properties on NpgsqlNotificationEventArgs
From Condition to Channel, from AdditionalInformation to Payload. The old names have been kept as obsolete properties.
1 parent 6f5e936 commit 693c47c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/Npgsql/NpgsqlNotificationEventArgs.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,30 @@ public sealed class NpgsqlNotificationEventArgs : EventArgs
1818
/// <summary>
1919
/// The channel on which the notification was sent.
2020
/// </summary>
21-
public string Condition { get; }
21+
public string Channel { get; }
2222

2323
/// <summary>
2424
/// An optional payload string that was sent with this notification.
2525
/// </summary>
26-
public string AdditionalInformation { get; }
26+
public string Payload { get; }
27+
28+
/// <summary>
29+
/// The channel on which the notification was sent.
30+
/// </summary>
31+
[Obsolete("Use Channel instead")]
32+
public string Condition => Channel;
33+
34+
/// <summary>
35+
/// An optional payload string that was sent with this notification.
36+
/// </summary>
37+
[Obsolete("Use Payload instead")]
38+
public string AdditionalInformation => Payload;
2739

2840
internal NpgsqlNotificationEventArgs(NpgsqlReadBuffer buf)
2941
{
3042
PID = buf.ReadInt32();
31-
Condition = buf.ReadNullTerminatedString();
32-
AdditionalInformation = buf.ReadNullTerminatedString();
43+
Channel = buf.ReadNullTerminatedString();
44+
Payload = buf.ReadNullTerminatedString();
3345
}
3446
}
3547
}

0 commit comments

Comments
 (0)