IMHO the _Success should be false when _UnitOfMeasue = '', right?
class function TInvoiceUnitCodeHelper.MapUnitOfMeasure(_UnitOfMeasure: String; out _Success: Boolean;
_DefaultOnFailure: TInvoiceUnitCode): TInvoiceUnitCode;
begin
Result := _DefaultOnFailure;
_Success := false;
_UnitOfMeasure := Trim(_UnitOfMeasure);
if _UnitOfMeasure = '' then
begin
_Success := true; ->> sollte doch false sein??
exit;
end;
--- snip ---
IMHO the _Success should be false when _UnitOfMeasue = '', right?
class function TInvoiceUnitCodeHelper.MapUnitOfMeasure(_UnitOfMeasure: String; out _Success: Boolean; _DefaultOnFailure: TInvoiceUnitCode): TInvoiceUnitCode; begin Result := _DefaultOnFailure; _Success := false; _UnitOfMeasure := Trim(_UnitOfMeasure); if _UnitOfMeasure = '' then begin _Success := true; ->> sollte doch false sein?? exit; end; --- snip ---