gpt4 book ai didi

delphi - 如何比较定义/实现顺序完全不同的两个大型 Delphi 单元?

转载 作者:行者123 更新时间:2023-12-02 03:22:37 24 4
gpt4 key购买 nike

我有两个从同一个 WSDL 导入生成的 Delphi 单元,一个由 XE2 生成,另一个由 XE3 生成。我想检查是否存在任何显着差异,但是两个文件中定义/实现的顺序都不同。我不可能编辑这些 25000 多行文件来匹配......

有人知道如何进行比较吗?这些文件很可能完全相同,但我对任何微小的差异感兴趣......

XE2 文件的示例部分:

FreeBusyResponseType = class;                 { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
GetUserAvailabilityResponseType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
SetUserOofSettingsResponse2 = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
FieldURIOrConstantType = class; { "http://schemas.microsoft.com/exchange/services/2006/types"[GblCplx] }
MessageXml = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Cplx] }
BaseRequestType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
GetFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
BaseMoveCopyItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
CopyItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
MoveItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CreateAttachmentType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
BaseMoveCopyFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
MoveFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CopyFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
GetItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
SetUserOofSettingsRequest2 = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
GetUserOofSettingsRequest2 = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
BaseDelegateType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
GetRoomListsType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
GetRoomsType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }

[snip]

implementation
uses SysUtils;

destructor FreeBusyResponseType.Destroy;
begin
SysUtils.FreeAndNil(FResponseMessage);
SysUtils.FreeAndNil(FFreeBusyView);
inherited Destroy;
end;

procedure FreeBusyResponseType.SetResponseMessage(Index: Integer; const AResponseMessageType: ResponseMessageType);
begin
FResponseMessage := AResponseMessageType;
FResponseMessage_Specified := True;
end;

XE3 文件的示例部分:

GetUserAvailabilityResponseType = class;      { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
FreeBusyResponseType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
FieldURIOrConstantType = class; { "http://schemas.microsoft.com/exchange/services/2006/types"[GblCplx] }
SetUserOofSettingsResponse2 = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
MessageXml = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Cplx] }
BaseRequestType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
BaseMoveCopyFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
MoveFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CopyFolderType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CreateAttachmentType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
GetItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
BaseMoveCopyItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
MoveItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CopyItemType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
GetRoomsType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
SetUserOofSettingsRequest2 = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
BaseDelegateType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[GblCplx] }
DeleteUserConfigurationType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
CreateUserConfigurationType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }
UpdateUserConfigurationType = class; { "http://schemas.microsoft.com/exchange/services/2006/messages"[Lit][GblCplx] }

[snip]

implementation
uses SysUtils;

constructor GetUserAvailabilityResponseType.Create;
begin
inherited Create;
FSerializationOptions := [xoLiteralParam];
end;

destructor GetUserAvailabilityResponseType.Destroy;
var
I: Integer;
begin
for I := 0 to System.Length(FFreeBusyResponseArray)-1 do
SysUtils.FreeAndNil(FFreeBusyResponseArray[I]);
System.SetLength(FFreeBusyResponseArray, 0);
SysUtils.FreeAndNil(FSuggestionsResponse);
inherited Destroy;
end;

最佳答案

ModelMaker有一个类/方法实现级别的比较工具。它不受它们在源文件中的顺序的影响。

关于delphi - 如何比较定义/实现顺序完全不同的两个大型 Delphi 单元?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13286585/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com