Пример #1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="ServiceBusReceiverClient"/> class.
 /// </summary>
 ///
 /// <param name="connectionString">The connection string to use for connecting to the Service Bus namespace; it is expected that the entity name and the shared key properties are contained in this connection string.</param>
 /// <param name="entityName"></param>
 /// <param name="clientOptions"></param>
 ///
 /// <remarks>
 ///   If the connection string is copied from the Service Bus namespace, it will likely not contain the name of the desired Service Bus entity,
 ///   which is needed.  In this case, the name can be added manually by adding ";EntityPath=[[ ENTITY NAME ]]" to the end of the
 ///   connection string.  For example, ";EntityPath=telemetry-hub".
 ///
 ///   If you have defined a shared access policy directly on the Service Bus entity itself, then copying the connection string from that
 ///   Service Bus entity will result in a connection string that contains the name.
 /// </remarks>
 ///
 public SessionReceiverClient(
     string connectionString,
     string entityName,
     SessionReceiverClientOptions clientOptions)
     : base(connectionString, entityName, null, clientOptions?.Clone() ?? new SessionReceiverClientOptions())
 {
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="sessionId"></param>
 /// <param name="clientOptions"></param>
 internal SessionReceiverClient(
     ServiceBusConnection connection,
     string sessionId = null,
     SessionReceiverClientOptions clientOptions = default)
     : base(connection, sessionId, clientOptions?.Clone() ?? new SessionReceiverClientOptions())
 {
     SessionId = sessionId;
 }
Пример #3
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="SessionReceiverClient"/> class.
 /// </summary>
 ///
 /// <param name="fullyQualifiedNamespace">The fully qualified Service Bus namespace to connect to.  This is likely to be similar to <c>{yournamespace}.servicebus.windows.net</c>.</param>
 /// <param name="entityName">The name of the specific entity to associate the receiver with.</param>
 /// <param name="credential">The Azure managed identity credential to use for authorization.  Access controls may be specified by the Service Bus namespace or the requested Service Bus entity, depending on Azure configuration.</param>
 /// <param name="clientOptions">A set of options to apply when configuring the consumer.</param>
 ///
 public SessionReceiverClient(
     string fullyQualifiedNamespace,
     string entityName,
     TokenCredential credential,
     SessionReceiverClientOptions clientOptions = default)
     : base(fullyQualifiedNamespace, entityName, credential, null, clientOptions?.Clone() ?? new SessionReceiverClientOptions())
 {
 }