共用方式為


ContractAdapter.ContractToViewAdapter 方法

定義

如果在指定位置找到合適的主應用程式端配接器,則會取得增益集的主應用程式檢視。

多載

ContractToViewAdapter<TView>(ContractHandle, PipelineStoreLocation)

如果在由 PipelineStoreLocation 列舉的值所指定之位置找到合適的主應用程式端配接器,則取得增益集的主應用程式檢視。

ContractToViewAdapter<TView>(ContractHandle, String)

如果在路徑指定之位置找到合適的主應用程式端配接器,則取得增益集的主應用程式檢視。

ContractToViewAdapter<TView>(ContractHandle, PipelineStoreLocation)

如果在由 PipelineStoreLocation 列舉的值所指定之位置找到合適的主應用程式端配接器,則取得增益集的主應用程式檢視。

public:
generic <typename TView>
 static TView ContractToViewAdapter(System::AddIn::Pipeline::ContractHandle ^ contract, System::AddIn::Hosting::PipelineStoreLocation location);
public static TView ContractToViewAdapter<TView> (System.AddIn.Pipeline.ContractHandle contract, System.AddIn.Hosting.PipelineStoreLocation location);
static member ContractToViewAdapter : System.AddIn.Pipeline.ContractHandle * System.AddIn.Hosting.PipelineStoreLocation -> 'View
Public Shared Function ContractToViewAdapter(Of TView) (contract As ContractHandle, location As PipelineStoreLocation) As TView

類型參數

TView

定義增益集主應用程式檢視的型別。

參數

contract
ContractHandle

增益集要用於共用的合約控制代碼。

location
PipelineStoreLocation

主應用程式基底。

傳回

TView

共用之增益集主應用程式檢視。

例外狀況

location 無效。

備註

在此案例中,實體具有合約的實例,並想要將其調整為特定檢視。 使用這個方法來查詢系統,以尋找並具現化配接器以轉換成該檢視。

適用於

ContractToViewAdapter<TView>(ContractHandle, String)

如果在路徑指定之位置找到合適的主應用程式端配接器,則取得增益集的主應用程式檢視。

public:
generic <typename TView>
 static TView ContractToViewAdapter(System::AddIn::Pipeline::ContractHandle ^ contract, System::String ^ pipelineRoot);
public static TView ContractToViewAdapter<TView> (System.AddIn.Pipeline.ContractHandle contract, string pipelineRoot);
static member ContractToViewAdapter : System.AddIn.Pipeline.ContractHandle * string -> 'View
Public Shared Function ContractToViewAdapter(Of TView) (contract As ContractHandle, pipelineRoot As String) As TView

類型參數

TView

定義增益集主應用程式檢視的型別。

參數

contract
ContractHandle

增益集要用於共用的合約控制代碼。

pipelineRoot
String

增益集存放區的路徑。

傳回

TView

共用之增益集主應用程式檢視。

備註

在此案例中,實體具有合約的實例,並想要將其調整為特定檢視。 使用這個方法來查詢系統,以尋找並具現化配接器以轉換成該檢視。

適用於