diff --git a/Units/DelphiXMLDataBindingGenerator.pas b/Units/DelphiXMLDataBindingGenerator.pas index 6159f65..937bfd6 100644 --- a/Units/DelphiXMLDataBindingGenerator.pas +++ b/Units/DelphiXMLDataBindingGenerator.pas @@ -1631,12 +1631,14 @@ begin if not AItem.IsCollection then Exit; + + case ASection of dxsInterface: begin AStream.WriteLnNamedFmt(EnumeratorInterface, ['Name', AItem.TranslatedName, - 'ItemName', AItem.CollectionItem.TranslatedName, + 'DataType', GetDataTypeName(AItem.CollectionItem, True), 'GUID', CreateNewGUID]); AStream.WriteLn(''); end; @@ -1645,7 +1647,7 @@ begin begin AStream.WriteLnNamedFmt(EnumeratorClass, ['Name', AItem.TranslatedName, - 'ItemName', AItem.CollectionItem.TranslatedName]); + 'DataType', GetDataTypeName(AItem.CollectionItem, True)]); AStream.WriteLn(''); end; @@ -1653,7 +1655,7 @@ begin begin AStream.WriteLnNamedFmt(EnumeratorImplementation, ['Name', AItem.TranslatedName, - 'ItemName', AItem.CollectionItem.TranslatedName]); + 'DataType', GetDataTypeName(AItem.CollectionItem, True)]); end; end; end; diff --git a/Units/DelphiXMLDataBindingResources.pas b/Units/DelphiXMLDataBindingResources.pas index 90abc0d..0c4e34a 100644 --- a/Units/DelphiXMLDataBindingResources.pas +++ b/Units/DelphiXMLDataBindingResources.pas @@ -98,7 +98,7 @@ const XSDValidateMethodImplementationEnd = 'end;' + CrLf; - EnumeratorMethodInterface = ' function GetEnumerator: IXML%:sEnumerator;'; + EnumeratorMethodInterface = ' function GetEnumerator: %:sEnumerator;'; EnumeratorMethodImplementation = 'function TXML%:s.GetEnumerator: IXML%:sEnumerator;' + CrLf + 'begin' + CrLf + ' Result := TXML%:sEnumerator.Create(Self);' + CrLf + @@ -107,20 +107,20 @@ const EnumeratorInterface = ' IXML%:sEnumerator = interface' + CrLf + ' %:s' + CrLf + - ' function GetCurrent: IXML%:s;' + CrLf + + ' function GetCurrent: %:s;' + CrLf + ' function MoveNext: Boolean;' + CrLf + - ' property Current: IXML%:s read GetCurrent;' + CrLf + + ' property Current: %:s read GetCurrent;' + CrLf + ' end;' + CrLf; EnumeratorClass = ' TXML%:sEnumerator = class(TXMLNodeCollectionEnumerator, IXML%:sEnumerator)' + CrLf + ' protected' + CrLf + - ' function GetCurrent: IXML%:s;' + CrLf + + ' function GetCurrent: %:s;' + CrLf + ' end;' + CrLf; - EnumeratorImplementation = 'function TXML%:sEnumerator.GetCurrent: IXML%:s;' + CrLf + + EnumeratorImplementation = 'function TXML%:sEnumerator.GetCurrent: %:s;' + CrLf + 'begin' + CrLf + - ' Result := (inherited GetCurrent as IXML%:s);' + CrLf + + ' Result := (inherited GetCurrent as %:s);' + CrLf + 'end;' + CrLf; PropertyIntfMethodGetOptional = ' function GetHas%:s: Boolean;';