共用方式為


ExportBrokeredServiceAttribute 類別

定義

將類別匯出為代理服務。

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
[System.ComponentModel.Composition.MetadataAttribute]
public class ExportBrokeredServiceAttribute : System.ComponentModel.Composition.ExportAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)>]
[<System.ComponentModel.Composition.MetadataAttribute>]
type ExportBrokeredServiceAttribute = class
    inherit ExportAttribute
Public Class ExportBrokeredServiceAttribute
Inherits ExportAttribute
繼承
ExportBrokeredServiceAttribute
屬性

備註

套用這個屬性的類別必須實作 IExportedBrokeredService

套用此屬性之 類別所使用的任何其他MEF屬性都應該來自System.ComponentModel.Composition 命名空間。

如果支援多個代理服務版本,這個屬性可能會多次套用。

匯出的代理服務可能會從預設範圍匯入任何其他MEF匯出,以及下列類型, (沒有明確的合約名稱) :

代理服務可能不會匯入其他代理服務。 他們必須使用 IServiceBroker 來取得它們。

建構函式

ExportBrokeredServiceAttribute(String, String)

初始化 ExportBrokeredServiceAttribute 類別的新執行個體。

屬性

AllowTransitiveGuestClients

取得或設定值,指出是否允許來賓用戶端可轉移取得此服務。 根據預設, () false ,只有擁有者才能存取代理服務。 若要加入加入以允許來賓取得粗話服務,請將此設定為 true。 藉由將此設定為 true 服務,現在必須負責正確使用 IAuthorizationService 來授權敏感性作業。

Audience

取得或設定值,指出應該允許哪些用戶端直接取得此服務。 物件可能會位或一起展開允許取得此服務的用戶端集。

ServiceName

Name取得匯出之代理服務的 。

ServiceVersion

Version取得匯出之代理服務的 。

適用於