Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.59 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.59 KB

AEMO.MDFF

GitHub Actions Build Workflow Status NuGet Version NuGet Downloads License

Parser for Australian Energy Market Operator (AEMO) Meter Data File Format (MDFF) specification

Getting started

Install Nuget package

dotnet add package AEMO.MDFF

Use Nem12Reader to parse csv file

using AEMO.MDFF.NEM12;

var nem12Reader = new Nem12Reader();
await using var fs = new FileStream("nem12.csv", FileMode.Open, FileAccess.Read);
await foreach (var r in nem12Reader.ReadAsync(fs, CancellationToken.None))
{
    switch (r)
    {
        case HeaderRecord { VersionHeader: var vh }:
            Console.WriteLine(vh);
            break;
        case NMIDataDetailsRecord { NextScheduledReadDate: var nsrd }:
            Console.WriteLine(nsrd.ToLongDateString());
            break;
    }
}

References