語言

RpcMarshalableOptionalInterfaceAttribute(Int32, Type) 建構函式

定義

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

public RpcMarshalableOptionalInterfaceAttribute(int optionalInterfaceCode, Type optionalInterface);
new StreamJsonRpc.RpcMarshalableOptionalInterfaceAttribute : int * Type -> StreamJsonRpc.RpcMarshalableOptionalInterfaceAttribute
Public Sub New (optionalInterfaceCode As Integer, optionalInterface As Type)

參數

optionalInterfaceCode
Int32

要序列化的程式碼,以指定應產生封存物件代理並實作該 optionalInterface 介面。 optionalInterfaceCode 值必須在該屬性所應用類型的不同可選介面間保持唯一。 由於 optionalInterfaceCode 在傳送封裝物件時會被序列化,因此在更新 RPC 介面時,其值不應被重新分配到其他可選介面。

optionalInterface
Type

是 Type 已知可指令物件可能實作的可選介面之一。

適用於