Skip to content

Commit

Permalink
feat: add Getting started section to README (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahanoff authored Sep 13, 2024
1 parent ba91d63 commit 18da019
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
# AEMO.MDFF

[![Build](https://github.com/ahanoff/aemo-mdff-net/actions/workflows/build.yaml/badge.svg)](https://github.com/ahanoff/aemo-mdff-net/actions/workflows/build.yaml)
![NuGet Version](https://img.shields.io/nuget/vpre/AEMO.MDFF)
![NuGet Downloads](https://img.shields.io/nuget/dt/AEMO.MDFF)
![GitHub License](https://img.shields.io/github/license/ahanoff/aemo-mdff-net)

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

## Getting started

Install Nuget package

```shell
dotnet add package AEMO.MDFF
```

Use Nem12Reader to parse csv file

```csharp
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

Expand Down

0 comments on commit 18da019

Please sign in to comment.