ServiceDescriptionImporter.Style 屬性

定義

取得或設定值,決定匯入 ServiceDescriptions 值時產生的程式碼樣式 (用戶端或伺服器)。

public:
 property System::Web::Services::Description::ServiceDescriptionImportStyle Style { System::Web::Services::Description::ServiceDescriptionImportStyle get(); void set(System::Web::Services::Description::ServiceDescriptionImportStyle value); };
public System.Web.Services.Description.ServiceDescriptionImportStyle Style { get; set; }
member this.Style : System.Web.Services.Description.ServiceDescriptionImportStyle with get, set
Public Property Style As ServiceDescriptionImportStyle

屬性值

ServiceDescriptionImportStyle

其中一個 ServiceDescriptionImportStyle 值。 預設為 Client

範例

下列範例說明 屬性的使用 Style

// Generate a proxy client.
importer->Style = ServiceDescriptionImportStyle::Client;
// Generate a proxy client.
importer.Style = ServiceDescriptionImportStyle.Client;

備註

Style如果 屬性設定 Client 為 ,會產生 ServiceDescriptionImporter 用戶端 Proxy 類別,藉由呼叫它們來提供所描述 Web 服務的功能。

Style如果 屬性設定 Server 為 , ServiceDescriptionImporter 實例會產生抽象類別,這些類別代表所描述 XML Web 服務的功能,而不需要實作它們。 然後,您可以撰寫繼承自這些抽象類別的類別,並實作相關的方法來實作它們。

適用於