Share via


ServiceContract 類別

The ServiceContract objects represents a contract that specifies the direction and type of messages in a conversation.

命名空間:  Microsoft.SqlServer.Management.Smo.Broker
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<PhysicalFacetAttribute> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<LocalizedPropertyResourcesAttribute("Microsoft.SqlServer.Management.Smo.Broker.BrokerLocalizableResources",  _
    True)> _
<TypeConverterAttribute(GetType(LocalizableTypeConverter))> _
Public NotInheritable Class ServiceContract _
    Inherits BrokerObjectBase _
    Implements IObjectPermission, IExtendedProperties, ICreatable, IAlterable,  _
    IDroppable
'用途
Dim instance As ServiceContract
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[LocalizedPropertyResourcesAttribute("Microsoft.SqlServer.Management.Smo.Broker.BrokerLocalizableResources", 
    true)]
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
public sealed class ServiceContract : BrokerObjectBase, 
    IObjectPermission, IExtendedProperties, ICreatable, IAlterable, IDroppable
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[LocalizedPropertyResourcesAttribute(L"Microsoft.SqlServer.Management.Smo.Broker.BrokerLocalizableResources", 
    true)]
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
public ref class ServiceContract sealed : public BrokerObjectBase, 
    IObjectPermission, IExtendedProperties, ICreatable, IAlterable, IDroppable
[<SealedAttribute>]
[<PhysicalFacetAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<LocalizedPropertyResourcesAttribute("Microsoft.SqlServer.Management.Smo.Broker.BrokerLocalizableResources", 
    true)>]
[<TypeConverterAttribute(typeof(LocalizableTypeConverter))>]
type ServiceContract =  
    class
        inherit BrokerObjectBase
        interface IObjectPermission
        interface IExtendedProperties
        interface ICreatable
        interface IAlterable
        interface IDroppable
    end
public final class ServiceContract extends BrokerObjectBase implements IObjectPermission, IExtendedProperties, ICreatable, IAlterable, IDroppable

備註

To get ServiceContract object properties, users can be a member of the public fixed server role.

To set ServiceContract object properties, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To create a service contract, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To drop a service contract, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To grant, deny, or revoke permissions on the service type to other users, users must have CONTROL permission on the message type

Thread Safety

這種類型的任何公用靜態 (在 Microsoft Visual Basic 中則為 Shared) 成員都可用於多執行緒作業。並不是所有的執行個體成員都保證可以用於所有的執行緒。

執行緒安全性

這個類型的任何公用static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員都可以是安全執行緒。