diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs index ebcf887b5c03..a303dfcb9e20 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs @@ -192,15 +192,15 @@ public static partial class ServiceBusModelFactory public partial class ServiceBusProcessor : System.IAsyncDisposable { protected ServiceBusProcessor() { } - public bool AutoCompleteMessages { get { throw null; } } - public string EntityPath { get { throw null; } } - public string FullyQualifiedNamespace { get { throw null; } } - public bool IsClosed { get { throw null; } } - public bool IsProcessing { get { throw null; } } - public System.TimeSpan MaxAutoLockRenewalDuration { get { throw null; } } - public int MaxConcurrentCalls { get { throw null; } } - public int PrefetchCount { get { throw null; } } - public Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } + public virtual bool AutoCompleteMessages { get { throw null; } } + public virtual string EntityPath { get { throw null; } } + public virtual string FullyQualifiedNamespace { get { throw null; } } + public virtual bool IsClosed { get { throw null; } } + public virtual bool IsProcessing { get { throw null; } } + public virtual System.TimeSpan MaxAutoLockRenewalDuration { get { throw null; } } + public virtual int MaxConcurrentCalls { get { throw null; } } + public virtual int PrefetchCount { get { throw null; } } + public virtual Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } public event System.Func ProcessErrorAsync { add { } remove { } } public event System.Func ProcessMessageAsync { add { } remove { } } public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -266,11 +266,11 @@ public enum ServiceBusReceiveMode public partial class ServiceBusReceiver : System.IAsyncDisposable { protected ServiceBusReceiver() { } - public string EntityPath { get { throw null; } } + public virtual string EntityPath { get { throw null; } } public virtual string FullyQualifiedNamespace { get { throw null; } } public virtual bool IsClosed { get { throw null; } } - public int PrefetchCount { get { throw null; } } - public Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } + public virtual int PrefetchCount { get { throw null; } } + public virtual Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } public virtual System.Threading.Tasks.Task AbandonMessageAsync(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, System.Collections.Generic.IDictionary propertiesToModify = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CompleteMessageAsync(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -336,7 +336,7 @@ protected ServiceBusRetryPolicy() { } public partial class ServiceBusSender : System.IAsyncDisposable { protected ServiceBusSender() { } - public string EntityPath { get { throw null; } } + public virtual string EntityPath { get { throw null; } } public virtual string FullyQualifiedNamespace { get { throw null; } } public virtual bool IsClosed { get { throw null; } } public virtual System.Threading.Tasks.Task CancelScheduledMessageAsync(long sequenceNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -360,16 +360,16 @@ protected ServiceBusSender() { } public partial class ServiceBusSessionProcessor : System.IAsyncDisposable { protected ServiceBusSessionProcessor() { } - public bool AutoCompleteMessages { get { throw null; } } - public string EntityPath { get { throw null; } } - public string FullyQualifiedNamespace { get { throw null; } } - public bool IsClosed { get { throw null; } } - public bool IsProcessing { get { throw null; } } - public System.TimeSpan MaxAutoLockRenewalDuration { get { throw null; } } - public int MaxConcurrentCallsPerSession { get { throw null; } } - public int MaxConcurrentSessions { get { throw null; } } - public int PrefetchCount { get { throw null; } } - public Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } + public virtual bool AutoCompleteMessages { get { throw null; } } + public virtual string EntityPath { get { throw null; } } + public virtual string FullyQualifiedNamespace { get { throw null; } } + public virtual bool IsClosed { get { throw null; } } + public virtual bool IsProcessing { get { throw null; } } + public virtual System.TimeSpan MaxAutoLockRenewalDuration { get { throw null; } } + public virtual int MaxConcurrentCallsPerSession { get { throw null; } } + public virtual int MaxConcurrentSessions { get { throw null; } } + public virtual int PrefetchCount { get { throw null; } } + public virtual Azure.Messaging.ServiceBus.ServiceBusReceiveMode ReceiveMode { get { throw null; } } public event System.Func ProcessErrorAsync { add { } remove { } } public event System.Func ProcessMessageAsync { add { } remove { } } public event System.Func SessionClosingAsync { add { } remove { } } @@ -405,8 +405,8 @@ public ServiceBusSessionProcessorOptions() { } public partial class ServiceBusSessionReceiver : Azure.Messaging.ServiceBus.ServiceBusReceiver { protected ServiceBusSessionReceiver() { } - public string SessionId { get { throw null; } } - public System.DateTimeOffset SessionLockedUntil { get { throw null; } } + public virtual string SessionId { get { throw null; } } + public virtual System.DateTimeOffset SessionLockedUntil { get { throw null; } } public virtual System.Threading.Tasks.Task GetSessionStateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RenewSessionLockAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SetSessionStateAsync(System.BinaryData sessionState, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs old mode 100644 new mode 100755 index e0147b5f8af2..73e3cffa949a --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusProcessor.cs @@ -56,13 +56,13 @@ public class ServiceBusProcessor : IAsyncDisposable /// Gets the fully qualified Service Bus namespace that the receiver is associated with. This is likely /// to be similar to {yournamespace}.servicebus.windows.net. /// - public string FullyQualifiedNamespace => _connection.FullyQualifiedNamespace; + public virtual string FullyQualifiedNamespace => _connection.FullyQualifiedNamespace; /// /// Gets the path of the Service Bus entity that the processor is connected to, specific to the /// Service Bus namespace that contains it. /// - public string EntityPath { get; private set; } + public virtual string EntityPath { get; private set; } /// /// Gets the ID to identify this processor. This can be used to correlate logs and exceptions. @@ -73,7 +73,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// Gets the used to specify how messages are received. Defaults to PeekLock mode. /// - public ServiceBusReceiveMode ReceiveMode { get; } + public virtual ServiceBusReceiveMode ReceiveMode { get; } /// /// Gets whether the processor is configured to process session entities. @@ -85,7 +85,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// during processing. This is intended to help maximize throughput by allowing the /// processor to receive from a local cache rather than waiting on a service request. /// - public int PrefetchCount { get; } + public virtual int PrefetchCount { get; } /// /// Gets whether or not this processor is currently processing messages. @@ -94,7 +94,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// true if the processor is processing messages; otherwise, false. /// - public bool IsProcessing => ActiveReceiveTask != null; + public virtual bool IsProcessing => ActiveReceiveTask != null; private readonly ServiceBusProcessorOptions _options; @@ -109,7 +109,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// /// The maximum number of concurrent calls to the message handler. - public int MaxConcurrentCalls { get; } + public virtual int MaxConcurrentCalls { get; } /// /// Gets a value that indicates whether the processor should automatically @@ -120,7 +120,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// true to complete the message processing automatically on /// successful execution of the operation; otherwise, false. - public bool AutoCompleteMessages { get; } + public virtual bool AutoCompleteMessages { get; } /// /// Gets the maximum duration within which the lock will be renewed automatically. This @@ -131,7 +131,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// The message renew can continue for sometime in the background /// after completion of message and result in a few false MessageLockLostExceptions temporarily. - public TimeSpan MaxAutoLockRenewalDuration { get; } + public virtual TimeSpan MaxAutoLockRenewalDuration { get; } /// /// The instance of which can be mocked for testing. @@ -147,7 +147,7 @@ public class ServiceBusProcessor : IAsyncDisposable /// /// true if the processor is closed; otherwise, false. /// - public bool IsClosed + public virtual bool IsClosed { get => _closed; private set => _closed = value; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs old mode 100644 new mode 100755 index 9840dc342a15..6a928c45ff9d --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/ServiceBusSessionProcessor.cs @@ -28,7 +28,7 @@ public class ServiceBusSessionProcessor : IAsyncDisposable private readonly ServiceBusProcessor _innerProcessor; /// - public string EntityPath => _innerProcessor.EntityPath; + public virtual string EntityPath => _innerProcessor.EntityPath; /// /// Gets the ID to identify this processor. This can be used to correlate logs and exceptions. @@ -37,16 +37,16 @@ public class ServiceBusSessionProcessor : IAsyncDisposable internal string Identifier => _innerProcessor.Identifier; /// - public ServiceBusReceiveMode ReceiveMode => _innerProcessor.ReceiveMode; + public virtual ServiceBusReceiveMode ReceiveMode => _innerProcessor.ReceiveMode; /// - public int PrefetchCount => _innerProcessor.PrefetchCount; + public virtual int PrefetchCount => _innerProcessor.PrefetchCount; /// - public bool IsProcessing => _innerProcessor.IsProcessing; + public virtual bool IsProcessing => _innerProcessor.IsProcessing; /// - public bool AutoCompleteMessages => _innerProcessor.AutoCompleteMessages; + public virtual bool AutoCompleteMessages => _innerProcessor.AutoCompleteMessages; /// /// Indicates whether or not this has been closed. @@ -55,7 +55,7 @@ public class ServiceBusSessionProcessor : IAsyncDisposable /// /// true if the processor is closed; otherwise, false. /// - public bool IsClosed => _innerProcessor.IsClosed; + public virtual bool IsClosed => _innerProcessor.IsClosed; /// /// Gets the maximum duration within which the session lock will be @@ -67,21 +67,21 @@ public class ServiceBusSessionProcessor : IAsyncDisposable /// The session lock renewal can continue for sometime in the background /// after completion of message and result in a few false SessionLockLost exceptions temporarily. /// - public TimeSpan MaxAutoLockRenewalDuration => _innerProcessor.MaxAutoLockRenewalDuration; + public virtual TimeSpan MaxAutoLockRenewalDuration => _innerProcessor.MaxAutoLockRenewalDuration; /// Gets the maximum number of sessions that will be processed concurrently by the processor. /// The default value is 8. - public int MaxConcurrentSessions => _innerProcessor.MaxConcurrentSessions; + public virtual int MaxConcurrentSessions => _innerProcessor.MaxConcurrentSessions; /// /// Gets the maximum number of calls to the callback the processor will initiate per session. /// Thus the total number of callbacks will be equal to MaxConcurrentSessions * MaxConcurrentCallsPerSession. /// The default value is 1. /// - public int MaxConcurrentCallsPerSession => _innerProcessor.MaxConcurrentCallsPerSession; + public virtual int MaxConcurrentCallsPerSession => _innerProcessor.MaxConcurrentCallsPerSession; /// - public string FullyQualifiedNamespace => _innerProcessor.FullyQualifiedNamespace; + public virtual string FullyQualifiedNamespace => _innerProcessor.FullyQualifiedNamespace; internal ServiceBusSessionProcessor( ServiceBusConnection connection, diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs index 6121bc1d2981..3d58ff545e48 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs @@ -34,12 +34,12 @@ public class ServiceBusReceiver : IAsyncDisposable /// The path of the Service Bus entity that the receiver is connected to, specific to the /// Service Bus namespace that contains it. /// - public string EntityPath { get; } + public virtual string EntityPath { get; } /// /// The used to specify how messages are received. Defaults to PeekLock mode. /// - public ServiceBusReceiveMode ReceiveMode { get; } + public virtual ServiceBusReceiveMode ReceiveMode { get; } /// /// Indicates whether the receiver entity is session enabled. @@ -51,7 +51,7 @@ public class ServiceBusReceiver : IAsyncDisposable /// whether a processing is currently active, intended to help maximize throughput by allowing the receiver to receive /// from a local cache rather than waiting on a service request. /// - public int PrefetchCount { get; } + public virtual int PrefetchCount { get; } /// /// Gets the ID to identify this client. This can be used to correlate logs and exceptions. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusSessionReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusSessionReceiver.cs old mode 100644 new mode 100755 index 494fd2ae1a0e..59a15b6718b5 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusSessionReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusSessionReceiver.cs @@ -23,12 +23,12 @@ public class ServiceBusSessionReceiver : ServiceBusReceiver /// /// The Session Id associated with the receiver. /// - public string SessionId => InnerReceiver.SessionId; + public virtual string SessionId => InnerReceiver.SessionId; /// /// Gets the that the receiver's session is locked until. /// - public DateTimeOffset SessionLockedUntil => InnerReceiver.SessionLockedUntil; + public virtual DateTimeOffset SessionLockedUntil => InnerReceiver.SessionLockedUntil; /// /// Creates a session receiver which can be used to interact with all messages with the same sessionId. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs index fac32f087b78..9795c1d2346a 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs @@ -40,7 +40,7 @@ public class ServiceBusSender : IAsyncDisposable /// Service Bus namespace that contains it. /// /// - public string EntityPath { get; } + public virtual string EntityPath { get; } /// /// Indicates whether or not this has been closed.