共用方式為


ICodeGenerationHost 介面

定義程式碼產生的主物件介面。

命名空間: Microsoft.ServiceModel.DomainServices.Tools
組件: Microsoft.ServiceModel.DomainServices.Tools (於 microsoft.servicemodel.domainservices.tools.dll)

使用方式

'用途
Dim instance As ICodeGenerationHost

語法

'宣告
Public Interface ICodeGenerationHost
    Inherits ILogger
public interface ICodeGenerationHost : ILogger
public interface class ICodeGenerationHost : ILogger
public interface ICodeGenerationHost extends ILogger
public interface ICodeGenerationHost extends ILogger

備註

程式碼產生器中提供了實作此介面的物件執行個體。產生器使用此主執行個體,將錯誤、警告和訊息記錄回環境中。

產生器也會使用此主執行個體,判斷來源和目標專案所共用的型別或成員。在此內容中,「來源」專案包含需要從中產生程式碼的型別。「目標」專案則是將插入所產生程式碼的專案。

判斷共用程式碼成員的此服務僅供程式碼產生器使用,以便得知可從所產生程式碼安全進行哪些成員參考或宣告。

平台

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 、Windows Server 2008 和 Windows 2000

目標平台

另請參閱

參考

ICodeGenerationHost 成員
Microsoft.ServiceModel.DomainServices.Tools 命名空間