Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Getting started section to README #8

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading