MiniUtilWrapTu, Tw Method
convert a list by calling the ctor of the target piecewise.
For example convert a list of double to a list of GH_Number's
by var ns = Wrap<double, GH_Number>(...).ToList().
Namespace: Karamba.UtilitiesAssembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
public static IEnumerable<Tw> Wrap<Tu, Tw>(
IEnumerable<Tu> in_list
)
where Tw : class, new()
Public Shared Function Wrap(Of Tu, Tw As {Class, New}) (
in_list As IEnumerable(Of Tu)
) As IEnumerable(Of Tw)
public:
generic<typename Tu, typename Tw>
where Tw : ref class, gcnew()
static IEnumerable<Tw>^ Wrap(
IEnumerable<Tu>^ in_list
)
static member Wrap :
in_list : IEnumerable<'Tu> -> IEnumerable<'Tw> when 'Tw : not struct, new()
- in_list IEnumerableTu
- input list.
- Tu
- from type.
- Tw
- into type per ctor call.
IEnumerableTwresult list.
nulls are mapped to nulls. Prepend a filter when needed.