Last active
May 29, 2019 07:36
-
-
Save GeorgDangl/4c181ea88cd5f7d30af17b6ef68ab15e to your computer and use it in GitHub Desktop.
Convert between German GAEB files and Austrian ÖNorm 2063 with the libraries by Dangl IT GmbH, see https://www.dangl-it.com/articles/convert-between-oenorm-2063-and-gaeb-files-with-danglava-dangloenorm-and-danglgaeb/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task TransformToOenormAsync() | |
{ | |
var convertedProject = Dangl.Oenorm.Converter.ConvertToOenorm(_readProject, OenormDestinationType.LV2015); | |
using (var oenormStream = Dangl.Oenorm.Writer.OenormWriter.GetStream(convertedProject)) | |
{ | |
var outputPath = Path.GetFullPath(_options.OutputFilePath); | |
using (var fileStream = File.Create(outputPath)) | |
{ | |
await oenormStream.CopyToAsync(fileStream); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void ReadInputGaebFile() | |
{ | |
var filePath = Path.GetFullPath(_options.InputFilePath); | |
using (var fileStream = File.OpenRead(filePath)) | |
{ | |
var gaebFile = Dangl.GAEB.Reader.GAEBReader.ReadGaeb(fileStream); | |
_readProject = Dangl.AVA.Converter.Converter.ConvertFromGaeb(gaebFile); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment