Skip to content

Commit 771c61c

Browse files
committed
Move extension method into appropreate class
1 parent fd57b1d commit 771c61c

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

src/Microsoft.Azure.ServiceBus/Extensions/MessageDiagnosticsExtensions.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,5 @@ internal static bool TryExtractContext(this Message message, out IList<KeyValueP
150150
}
151151
return false;
152152
}
153-
154-
155-
internal static void VerifyMessageIsNotPreviouslyReceived(this Message message)
156-
{
157-
if (message.SystemProperties.IsLockTokenSet)
158-
{
159-
throw Fx.Exception.Argument(nameof(message), "Cannot send a message that was already received.");
160-
}
161-
}
162153
}
163154
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace Microsoft.Azure.ServiceBus
2+
{
3+
using Microsoft.Azure.ServiceBus.Primitives;
4+
5+
internal static class MessageExtensions
6+
{
7+
public static void VerifyMessageIsNotPreviouslyReceived(this Message message)
8+
{
9+
if (message.SystemProperties.IsLockTokenSet)
10+
{
11+
throw Fx.Exception.Argument(nameof(message), "Cannot send a message that was already received.");
12+
}
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)