OnNextDataPoint()

View as Markdown

Definition

The OnNextDataPoint() method is called for each line of data contained in the file being imported. This method is only called if the import type determines that the file has a valid data point, and will continue to be called until it reaches the end of the file, or until the data point is no longer valid.

Method Return Value

This method does not return a value.

Syntax

See example below. The NinjaScript code wizards automatically generate the method syntax for you.

Examples

1private StreamReader reader;
2
3protected override void OnNextDataPoint()
4{
5 if (reader == null)
6 return;
7
8 // Continually read data using the StreamReader defined above
9 while (true)
10 {
11 DataPointString = reader.ReadLine();
12 // Additional data formatting here
13 }
14}