ExtensionMethodsGenerateWorkTInput, TWorkDescription, TWorkerDescription, TOutput, TTime Method Naiad Help

[This is preliminary documentation and is subject to change.]

Add a work generator taking a stream of inputs and converting each input to a stream of outputs, by assigning inputs to workers of a given type

Namespace: Microsoft.Research.Naiad.Frameworks.WorkGenerator
Assembly: Microsoft.Research.Naiad.WorkGenerator (in Microsoft.Research.Naiad.WorkGenerator.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax

C#
public static Stream<TOutput, TTime> GenerateWork<TInput, TWorkDescription, TWorkerDescription, TOutput, TTime>(
	this Stream<TInput, TTime> input,
	Func<TTime, ICoordinator<TInput, TWorkDescription, TWorkerDescription>> coordinatorFactory,
	Func<int, TTime, IWorker<TWorkDescription, TWorkerDescription, TOutput>> workerFactory
)
where TTime : Object, Time<TTime>

Parameters

input
Type: Microsoft.Research.NaiadStreamTInput, TTime
stream of input records
coordinatorFactory
Type: SystemFuncTTime, ICoordinatorTInput, TWorkDescription, TWorkerDescription
factory to make the work coordinator object
workerFactory
Type: SystemFuncInt32, TTime, IWorkerTWorkDescription, TWorkerDescription, TOutput
factory to make the worker objects

Type Parameters

TInput
The type of input records to consume
TWorkDescription
Description of a work item
TWorkerDescription
Description of a worker, used to match workers to items
TOutput
The type of output records produced by workers
TTime
The time of input records

Return Value

Type: StreamTOutput, TTime
stream of output records

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type StreamTInput, TTime. 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).
See Also

Reference