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().

Definition

Namespace: Karamba.Utilities
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
public static IEnumerable<Tw> Wrap<Tu, Tw>(
	IEnumerable<Tu> in_list
)
where Tw : class, new()

Parameters

in_list  IEnumerableTu
input list.

Type Parameters

Tu
from type.
Tw
into type per ctor call.

Return Value

IEnumerableTw
result list.

Remarks

nulls are mapped to nulls. Prepend a filter when needed.

See Also