Share via


BrokerPriority.ContractName Property

Gets or sets the contract name specified for the BrokerPriority object.

This API is not CLS-compliant. 

Namespace:  Microsoft.SqlServer.Management.Smo.Broker
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
<SfcReferenceAttribute(GetType(ServiceContract), "Server[@Name = '{0}']/Database[@Name = '{1}']/ServiceBroker/ServiceContract[@Name='{2}']",  _
    )> _
Public Property ContractName As String
    Get
    Set
'Usage
Dim instance As BrokerPriority
Dim value As String

value = instance.ContractName

instance.ContractName = value
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
[SfcReferenceAttribute(typeof(ServiceContract), "Server[@Name = '{0}']/Database[@Name = '{1}']/ServiceBroker/ServiceContract[@Name='{2}']", 
    )]
public string ContractName { get; set; }
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
[SfcReferenceAttribute(typeof(ServiceContract), L"Server[@Name = '{0}']/Database[@Name = '{1}']/ServiceBroker/ServiceContract[@Name='{2}']", 
    )]
public:
property String^ ContractName {
    String^ get ();
    void set (String^ value);
}
[<CLSCompliantAttribute(false)>]
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
[<SfcReferenceAttribute(typeof(ServiceContract), "Server[@Name = '{0}']/Database[@Name = '{1}']/ServiceBroker/ServiceContract[@Name='{2}']", 
    )>]
member ContractName : string with get, set
function get ContractName () : String
function set ContractName (value : String)

Property Value

Type: System.String
A String value that specifies the name of a Service Broker contract to be used as a criterion for determining if the conversation priority applies to a conversation.

Remarks

If ANY is specified for the contract name, the conversation priority can be applied to any conversation, regardless of which contract it uses. If the name of a contract is specified, the conversation priority can be applied only to conversations where the BEGIN DIALOG statement that started the conversation specified ON CONTRACT ContractName. ContractName must specify a contract in the current database.

The ContractName default is ANY.