[JEDI.NET-commits] main/run Jedi.System.pas,1.5,1.6
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2004-11-24 13:48:43
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12317/main/run Modified Files: Jedi.System.pas Log Message: * AttributeUtils.IndexOf will only match attributes if the the Equals method returns True (only applicable if searching for an Attribute instance; when searching of an AttributeType, the same rules as before applies: any attribute of assignment compatible type will match). Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.System.pas 24 Nov 2004 12:08:13 -0000 1.5 --- Jedi.System.pas 24 Nov 2004 13:48:27 -0000 1.6 *************** *** 80,83 **** --- 80,84 ---- var attrType: System.Type; + endLoop: Boolean; begin if attr is System.Type then *************** *** 86,91 **** attrType := attr.GetType; Result := attrList.Count - 1; ! while (Result >= 0) and not attrType.IsAssignableFrom(attrList[Result].GetType) do ! Dec(Result); end; --- 87,99 ---- attrType := attr.GetType; Result := attrList.Count - 1; ! endLoop := False; ! while (Result >= 0) and not endLoop do ! begin ! endLoop := attrType.IsInstanceOfType(attrList[Result]); ! if endLoop and not &Object.ReferenceEquals(attr, attrType) then ! endLoop := attr.Equals(attrList[Result]); ! if not endLoop then ! Dec(Result); ! end; end; |