C# Class Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Helpers.ParsingHelper

Show file Open project: Azure/azure-iot-remote-monitoring

Public Methods

Method Description
ParseCsv ( TextReader textReader ) : IEnumerable

Parses a TextReader's contents as a CSV.

ToDictionaries ( this parsedCsv ) : string>>.IEnumerable

Expresses a parsed CSV's items as string dictionaries.

The first parsed item's contents will be used as keys for subsequent items.

ToExpandoObjects ( this parsedCsv ) : IEnumerable

Expresses a parsed CSV's items as ExpandoObjects.

The first parsed item's contents will be used as property names for subsequent items.

Method Details

ParseCsv() public static method

Parses a TextReader's contents as a CSV.
public static ParseCsv ( TextReader textReader ) : IEnumerable
textReader TextReader /// The TextReader with contents to parse as a CSV. ///
return IEnumerable

ToDictionaries() public static method

Expresses a parsed CSV's items as string dictionaries.
The first parsed item's contents will be used as keys for subsequent items.
public static ToDictionaries ( this parsedCsv ) : string>>.IEnumerable
parsedCsv this /// The parsed CSV's items. ///
return string>>.IEnumerable

ToExpandoObjects() public static method

Expresses a parsed CSV's items as ExpandoObjects.
The first parsed item's contents will be used as property names for subsequent items.
public static ToExpandoObjects ( this parsedCsv ) : IEnumerable
parsedCsv this /// The parsed CSV's items. ///
return IEnumerable