/
MessageLockLostEventArgs.cs
36 lines (32 loc) · 1.3 KB
/
MessageLockLostEventArgs.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace Azure.Messaging.ServiceBus
{
/// <summary>
/// This type represents the event args relating to the message lock lost event.
/// </summary>
public class MessageLockLostEventArgs
{
/// <summary>
/// Constructs a new <see cref="MessageLockLostEventArgs"/> instance.
/// </summary>
/// <param name="message">The message that the lock was lost for.</param>
/// <param name="exception">The exception, if any, which led to the event being raised.</param>
public MessageLockLostEventArgs(ServiceBusReceivedMessage message, Exception exception)
{
Message = message;
Exception = exception;
}
/// <summary>
/// The message that the lock was lost for.
/// </summary>
public ServiceBusReceivedMessage Message { get; }
/// <summary>
/// Gets the exception, if any, which led to the event being raised. If the exception is null,
/// then the event was raised due to the message lock expiring based on the
/// <see cref="ServiceBusReceivedMessage.LockedUntil"/> property.
/// </summary>
public Exception Exception { get; }
}
}