Skip to content

Commit d9eb27f

Browse files
Merge pull request #474 from paulomorgado/remove-SetPersistent
Remove deprecated IBasicProperties.SetPersistent
2 parents 1303490 + 8effcf7 commit d9eb27f

File tree

3 files changed

+0
-67
lines changed

3 files changed

+0
-67
lines changed

projects/client/RabbitMQ.Client/src/client/api/IBasicProperties.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -282,21 +282,5 @@ public interface IBasicProperties : IContentHeader
282282
/// Returns true if the <see cref="UserId"/> UserId property is present.
283283
/// </summary>
284284
bool IsUserIdPresent();
285-
286-
/// <summary>Sets <see cref="DeliveryMode"/> to either persistent (2) or non-persistent (1).</summary>
287-
/// <remarks>
288-
/// <para>
289-
/// The numbers 1 and 2 for delivery mode are "magic" in that
290-
/// they appear in the AMQP 0-8 and 0-9 specifications as part
291-
/// of the definition of the DeliveryMode Basic-class property,
292-
/// without being defined as named constants.
293-
/// </para>
294-
/// <para>
295-
/// Calling this method causes <see cref="DeliveryMode"/> to take on a value.
296-
/// In order to reset <see cref="DeliveryMode"/> to the default empty condition, call <see cref="ClearDeliveryMode"/> .
297-
/// </para>
298-
/// </remarks>
299-
[Obsolete("Usage of this setter method is deprecated. Use the Persistent property instead.")]
300-
void SetPersistent(bool persistent);
301285
}
302286
}

projects/client/RabbitMQ.Client/src/client/impl/BasicProperties.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,6 @@ public PublicationAddress ReplyToAddress
275275
/// </summary>
276276
public abstract bool IsUserIdPresent();
277277

278-
/// <summary>Sets <see cref="DeliveryMode"/> to either persistent (2) or non-persistent (1).</summary>
279-
/// <remarks>
280-
/// <para>
281-
/// The numbers 1 and 2 for delivery mode are "magic" in that
282-
/// they appear in the AMQP 0-8 and 0-9 specifications as part
283-
/// of the definition of the DeliveryMode Basic-class property,
284-
/// without being defined as named constants.
285-
/// </para>
286-
/// <para>
287-
/// Calling this method causes <see cref="DeliveryMode"/> to take on a value.
288-
/// In order to reset <see cref="DeliveryMode"/> to the default empty condition, call <see cref="ClearDeliveryMode"/> .
289-
/// </para>
290-
/// </remarks>
291-
[Obsolete("Usage of this setter method is deprecated. Use the Persistent property instead.")]
292-
public void SetPersistent(bool persistent)
293-
{
294-
Persistent = persistent;
295-
}
296-
297278
public override object Clone()
298279
{
299280
var clone = MemberwiseClone() as BasicProperties;

projects/client/Unit/src/unit/TestBasicProperties.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -73,37 +73,5 @@ public void TestPersistentPropertyChangesDeliveryMode_PersistentFalseDelivery1()
7373
Assert.AreEqual(1, subject.DeliveryMode);
7474
Assert.AreEqual(false, subject.Persistent);
7575
}
76-
77-
78-
#pragma warning disable CS0618 // Type or member is obsolete
79-
[Test]
80-
public void TestSetPersistentMethodChangesDeliveryMode_PersistentTrueDelivery2()
81-
{
82-
// Arrange
83-
var subject = new Framing.BasicProperties();
84-
85-
// Act
86-
subject.SetPersistent(true);
87-
88-
// Assert
89-
Assert.AreEqual(2, subject.DeliveryMode);
90-
Assert.AreEqual(true, subject.Persistent);
91-
}
92-
93-
94-
[Test]
95-
public void TestSetPersistentMethodChangesDeliveryMode_PersistentFalseDelivery1()
96-
{
97-
// Arrange
98-
var subject = new Framing.BasicProperties();
99-
100-
// Act
101-
subject.SetPersistent(false);
102-
103-
// Assert
104-
Assert.AreEqual(1, subject.DeliveryMode);
105-
Assert.AreEqual(false, subject.Persistent);
106-
}
107-
#pragma warning restore CS0618 // Type or member is obsolete
10876
}
10977
}

0 commit comments

Comments
 (0)