NonStandardExtensionMethodsWriteToFilesTInput Method Naiad Help

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

Writes the records in the given stream to files.

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

C#
public static void WriteToFiles<TInput>(
	this Stream<TInput, Epoch> stream,
	string format,
	Action<TInput, BinaryWriter> action
)

Parameters

stream
Type: Microsoft.Research.NaiadStreamTInput, Epoch
The input stream.
format
Type: SystemString
Format string for filename, where {0} is replaced with the vertex ID.
action
Type: SystemActionTInput, BinaryWriter
Action to apply on each record and the corresponding BinaryWriter.

Type Parameters

TInput
The type of the input records.

Usage Note

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

The action parameter is used to write each record to its respective file. Often the action is similar to (record, writer) => writer.Write(record).
See Also

Reference