Share via


CollectionTransformation.Transform<TSourceCollection, TSourceElement, TTargetElement> Method

Namespace:  Microsoft.TeamFoundation.MVVM
Assembly:  Microsoft.TeamFoundation.Controls (in Microsoft.TeamFoundation.Controls.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Transform(Of TSourceCollection As {Class, Object, IEnumerable(Of TSourceElement), INotifyCollectionChanged}, TSourceElement, TTargetElement) ( _
    sourceCollection As TSourceCollection, _
    setup As Func(Of TSourceElement, TTargetElement), _
    teardown As Action(Of TTargetElement) _
) As TransformedCollection(Of TSourceCollection, TSourceElement, TTargetElement)
public static TransformedCollection<TSourceCollection, TSourceElement, TTargetElement> Transform<TSourceCollection, TSourceElement, TTargetElement>(
    this TSourceCollection sourceCollection,
    Func<TSourceElement, TTargetElement> setup,
    Action<TTargetElement> teardown
)
where TSourceCollection : class, Object, IEnumerable<TSourceElement>, INotifyCollectionChanged
[ExtensionAttribute]
public:
generic<typename TSourceCollection, typename TSourceElement, typename TTargetElement>
where TSourceCollection : ref class, Object, IEnumerable<TSourceElement>, INotifyCollectionChanged 
static TransformedCollection<TSourceCollection, TSourceElement, TTargetElement>^ Transform(
    TSourceCollection sourceCollection, 
    Func<TSourceElement, TTargetElement>^ setup, 
    Action<TTargetElement>^ teardown
)
static member Transform : 
        sourceCollection:'TSourceCollection * 
        setup:Func<'TSourceElement, 'TTargetElement> * 
        teardown:Action<'TTargetElement> -> TransformedCollection<'TSourceCollection, 'TSourceElement, 'TTargetElement>  when 'TSourceCollection : not struct and Object and IEnumerable<'TSourceElement> and INotifyCollectionChanged
JScript does not support generic types or methods.

Type Parameters

  • TSourceCollection
  • TSourceElement
  • TTargetElement

Parameters

  • sourceCollection
    Type: TSourceCollection
  • setup
    Type: System.Func<TSourceElement, TTargetElement>

Return Value

Type: Microsoft.TeamFoundation.MVVM.TransformedCollection<TSourceCollection, TSourceElement, TTargetElement>

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TSourceCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

CollectionTransformation Class

Microsoft.TeamFoundation.MVVM Namespace