Export (0) Print
Expand All

CollectionAdapters.ToIList(Of TContract, TView) Method (IListContract(Of TContract), Converter(Of TContract, TView), Converter(Of TView, TContract))

Converts a specified IListContract(Of T) collection to an IList(Of T) collection by using converter adapters.

Namespace:  System.AddIn.Pipeline
Assembly:  System.AddIn (in System.AddIn.dll)

Public Shared Function ToIList(Of TContract, TView) ( _
	collection As IListContract(Of TContract), _
	contractViewAdapter As Converter(Of TContract, TView), _
	viewContractAdapter As Converter(Of TView, TContract) _
) As IList(Of TView)

Type Parameters


The type that defines the contract for passing objects of type TView across the isolation boundary.


The type that defines the view of the objects in the list.


Type: System.AddIn.Contract.IListContract(Of TContract)

The collection to pass to the other side of the pipeline.

Type: System.Converter(Of TContract, TView)

A converter that adapts the data from the type defined in the contract to the type expected in the view.

Type: System.Converter(Of TView, TContract)

A converter that adapts the data from the type defined in the view to the type expected by the contract.

Return Value

Type: System.Collections.Generic.IList(Of TView)
The converted collection.

Use this method overload for IListContract(Of T) collections that contain types that must be adapted before they can be passed to the add-in or host (rather than simple serializable types that can be passed directly). The host application or add-in can use the returned IList(Of T) collection. It will have a lifetime token for the remote IListContract(Of T).

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft