From 9fe177abd37410d17033bb62d888d07e273c6d2c Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 23 Feb 2023 16:23:26 +0100 Subject: [PATCH] Interfaces: Add FileTooBig Error, Add note about future refactoring of GetPropertyValue --- Interfaces/ZUGFeRDInterface.vb | 1 + Interfaces/ZUGFeRDInterface/PropertyValues.vb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Interfaces/ZUGFeRDInterface.vb b/Interfaces/ZUGFeRDInterface.vb index ff2a22b6..6aa01922 100644 --- a/Interfaces/ZUGFeRDInterface.vb +++ b/Interfaces/ZUGFeRDInterface.vb @@ -34,6 +34,7 @@ Public Class ZUGFeRDInterface NoValidZugferd MissingProperties UnsupportedFormat + FileTooBig UnknownError End Enum diff --git a/Interfaces/ZUGFeRDInterface/PropertyValues.vb b/Interfaces/ZUGFeRDInterface/PropertyValues.vb index 2cff2ca6..63cfb0d7 100644 --- a/Interfaces/ZUGFeRDInterface/PropertyValues.vb +++ b/Interfaces/ZUGFeRDInterface/PropertyValues.vb @@ -239,6 +239,12 @@ Public Class PropertyValues Obj = oInfo.GetValue(Obj, Nothing) + ' TODO: This code should check for array properties by itself + ' and should not rely on the user to + 'If oInfo.PropertyType.IsArray Then + ' Obj = Obj(0) + 'End If + If oHasIndex Then Obj = Obj(0) End If @@ -264,6 +270,8 @@ Public Class PropertyValues Return oResults End If + + Next Return New List(Of Object) From {Obj}