Class VisualizationExtensions
Extension methods for use with visualizations.
Inherited Members
Namespace: Microsoft.Psi.Visualization.Extensions
Assembly: Microsoft.Psi.Visualization.Windows.dll
Syntax
public static class VisualizationExtensions
Methods
View SourceToArray<T, TEnumerable>(IProducer<TEnumerable>, DeliveryPolicy<TEnumerable>)
Converts stream of enumerables of T to a stream of arrays of T.
Declaration
public static IProducer<T[]> ToArray<T, TEnumerable>(this IProducer<TEnumerable> source, DeliveryPolicy<TEnumerable> deliveryPolicy = null)
where TEnumerable : IEnumerable<T>
Parameters
Type | Name | Description |
---|---|---|
IProducer<TEnumerable> | source | The stream of enumerables of T. |
DeliveryPolicy<TEnumerable> | deliveryPolicy | An optional delivery policy. |
Returns
Type | Description |
---|---|
IProducer<T[]> | A stream of the converted array of T. |
Type Parameters
Name | Description |
---|---|
T | The type of enumerable elements. |
TEnumerable | The type of enumerable. |
ToScatterPoints2D<TKey>(IProducer<Dictionary<TKey, Point2D>>, DeliveryPolicy<Dictionary<TKey, Point2D>>)
Converts stream of dictionaries of 2d points to a stream of list of named points.
Declaration
public static IProducer<List<Tuple<Point, string>>> ToScatterPoints2D<TKey>(this IProducer<Dictionary<TKey, Point2D>> source, DeliveryPolicy<Dictionary<TKey, Point2D>> deliveryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
IProducer<System.Collections.Generic.Dictionary<TKey, Point2D>> | source | The stream of dictionaries of 2d points. |
DeliveryPolicy<System.Collections.Generic.Dictionary<TKey, Point2D>> | deliveryPolicy | An optional delivery policy. |
Returns
Type | Description |
---|---|
IProducer<System.Collections.Generic.List<Tuple<Point, String>>> | A stream of the converted list of named points. |
Type Parameters
Name | Description |
---|---|
TKey | The type of dictionary keys. |
ToScatterRectangle<TKey>(IProducer<Dictionary<TKey, Rectangle>>, DeliveryPolicy<Dictionary<TKey, Rectangle>>)
Converts stream of dictionaries of rectangles to a stream of list of named rectangles.
Declaration
public static IProducer<List<Tuple<Rectangle, string>>> ToScatterRectangle<TKey>(this IProducer<Dictionary<TKey, Rectangle>> source, DeliveryPolicy<Dictionary<TKey, Rectangle>> deliveryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
IProducer<System.Collections.Generic.Dictionary<TKey, System.Drawing.Rectangle>> | source | The stream of dictionaries of rectangles. |
DeliveryPolicy<System.Collections.Generic.Dictionary<TKey, System.Drawing.Rectangle>> | deliveryPolicy | An optional delivery policy. |
Returns
Type | Description |
---|---|
IProducer<System.Collections.Generic.List<Tuple<System.Drawing.Rectangle, String>>> | A stream of the converted list of named rectangles. |
Type Parameters
Name | Description |
---|---|
TKey | The type of dictionary keys. |
Values<TKey, TValue>(IProducer<Dictionary<TKey, TValue>>, DeliveryPolicy<Dictionary<TKey, TValue>>)
Converts stream of dictionaries of TKey and TValue to a stream of collections of TValue.
Declaration
public static IProducer<Dictionary<TKey, TValue>.ValueCollection> Values<TKey, TValue>(this IProducer<Dictionary<TKey, TValue>> source, DeliveryPolicy<Dictionary<TKey, TValue>> deliveryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
IProducer<System.Collections.Generic.Dictionary<TKey, TValue>> | source | The stream of dictionaries of TKey and TValue. |
DeliveryPolicy<System.Collections.Generic.Dictionary<TKey, TValue>> | deliveryPolicy | An optional delivery policy. |
Returns
Type | Description |
---|---|
IProducer<Dictionary.ValueCollection<>> | A stream of the converted collections of TValue. |
Type Parameters
Name | Description |
---|---|
TKey | The type of dictionary keys. |
TValue | The type of dictionary values. |