jedidotnet-commits Mailing List for JEDI.NET (Page 2)
Status: Pre-Alpha
Brought to you by:
jedi_mbe
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(81) |
Jul
(7) |
Aug
(8) |
Sep
(2) |
Oct
|
Nov
(47) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(32) |
Feb
|
Mar
(86) |
Apr
|
May
(1) |
Jun
(24) |
Jul
(4) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
|
Dec
(9) |
From: Marcel B. <jed...@us...> - 2005-06-25 13:16:12
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6039/tools/JediDoc/source Modified Files: JediDoc.System.Xml.Reflection.pas Log Message: New: <case>, <option> and <condition> tags to handle "<para>option 1</para><para>-or-</para><para>option 2</para>" New: <eventref>, <fieldref>, <methodref>, <propertyref>, <typeref> tags to create <see> references to members. <ref> tag has been altered so it will now accept references to local members and you can specify whether the type should get its own <see> reference. Fix: <true-if> tag now accepts XML markup in its contents Index: JediDoc.System.Xml.Reflection.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.Reflection.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JediDoc.System.Xml.Reflection.pas 23 Jun 2005 17:27:11 -0000 1.4 --- JediDoc.System.Xml.Reflection.pas 25 Jun 2005 13:15:54 -0000 1.5 *************** *** 58,65 **** --- 58,68 ---- strict private class function GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; static; + class procedure GetMemberInfo(currentNode: XmlNode; out &type, member: string); static; + class function GetMemberNode(currentNode: XmlNode): XmlNode; static; class procedure ProcessIncludeReplacements(importedNode, includeNode: XmlNode); static; {$ENDREGION} {$REGION 'Custom tag processing methods'} strict private + class procedure ProcessCase(doc: XmlDocument); static; class procedure ProcessCtor(doc: XmlDocument); static; class procedure ProcessRef(doc: XmlDocument); static; *************** *** 140,143 **** --- 143,147 ---- class procedure XmlUtils.CustomTagProcessing(doc: XmlDocument); begin + ProcessCase(doc); ProcessCtor(doc); ProcessRef(doc); *************** *** 211,214 **** --- 215,268 ---- end; + class procedure XmlUtils.GetMemberInfo(currentNode: XmlNode; out &type, member: string); + var + attr: XmlAttribute; + begin + currentNode := GetMemberNode(currentNode); + attr := currentNode.Attributes['name']; + if attr = nil then + begin + &type := ''; + member := ''; + end + else + begin + member := StringUtils.BeforeLast(attr.Value, '('); + &type := StringUtils.BeforeLast(member, '.').Substring(2); + member := StringUtils.AfterLast(member, '.'); + end; + end; + + class function XmlUtils.GetMemberNode(currentNode: XmlNode): XmlNode; + begin + while (currentNode <> nil) and ((currentNode.NodeType <> XmlNodeType.Element) or (currentNode.Name <> 'member')) do + currentNode := currentNode.ParentNode; + Result := currentNode; + end; + + class procedure XmlUtils.ProcessCase(doc: XmlDocument); + var + replaceList: Hashtable; + caseNode: XmlNode; + frag: XmlDocumentFragment; + prevSibling: XmlElement; + entry: DictionaryEntry; + begin + replaceList := HashTable.Create; + for caseNode in doc.SelectNodes('//*[self::case or self::option or self::condition]') do + begin + frag := doc.CreateDocumentFragment; + prevSibling := XmlElement(caseNode.PreviousSibling); + if (prevSibling <> nil) and ( + (prevSibling.Name = 'case') or (prevSibling.Name = 'option') or (prevSibling.Name = 'condition')) then + frag.InnerXml := System.String.Format('<para>-or-</para><para>{0}</para>', caseNode.InnerXml.Trim) + else + frag.InnerXml := System.String.Format('<para>{0}</para>', caseNode.InnerXml.Trim); + replaceList.Add(caseNode, frag); + end; + for entry in replaceList do + XmlNode(entry.Key).ParentNode.ReplaceChild(XmlNode(entry.Value), XmlNode(entry.Key)); + end; + class procedure XmlUtils.ProcessCtor(doc: XmlDocument); var *************** *** 265,304 **** class procedure XmlUtils.ProcessRef(doc: XmlDocument); var ! removeList: ArrayList; refNode: XmlNode; ! attr: XmlAttribute; typeName: string; memberName: string; ! memberType: string; ! frag: XmlDocumentFragment; ! obj: &Object; begin ! removeList := ArrayList.Create; ! for refNode in doc.GetElementsByTagName('ref') do begin attr := refNode.Attributes['type']; ! if attr = nil then ! raise Exception.Create('Missing ''type'' attribute in ''ref'' tag'); ! typeName := attr.Value; attr := refNode.Attributes['member']; ! if attr = nil then ! raise Exception.Create('Missing ''member'' attribute in ''ref'' tag'); ! memberName := attr.Value; ! attr := refNode.Attributes['memberType']; ! if attr = nil then ! memberType := 'M' else ! memberType := attr.Value.Chars[0]; ! frag := doc.CreateDocumentFragment; ! frag.InnerXml := System.String.Format('<see cref="T:{0}" />.<see cref="{2}:{0}.{1}" />', ! typeName, memberName, memberType.ToUpper); ! refNode.ParentNode.InsertBefore(frag, refNode); ! removeList.Add(refNode); end; ! for obj in removeList do ! XmlNode(obj).ParentNode.RemoveChild(XmlNode(obj)); end; --- 319,401 ---- class procedure XmlUtils.ProcessRef(doc: XmlDocument); var ! replaceList: Hashtable; refNode: XmlNode; ! frag: XmlDocumentFragment; ! thisType: string; ! thisMember: string; ! canonType: string; typeName: string; memberName: string; ! refToType: Boolean; ! attr: XmlAttribute; ! entry: DictionaryEntry; begin ! replaceList := HashTable.Create; ! for refNode in doc.SelectNodes( ! '//*[self::eventref or self::fieldref or self::methodref or self::propertyref or self::ref or self::typeref]') do begin + frag := doc.CreateDocumentFragment; + GetMemberInfo(refNode, thisType, thisMember); + + if refNode.Name = 'ref' then + begin + attr := refNode.Attributes['memberType']; + if attr = nil then + canonType := 'M' + else + canonType := attr.Value.Substring(0, 1).ToUpper; + end + else + canonType := refNode.Name.SubString(0, 1).ToUpper; + attr := refNode.Attributes['type']; ! if attr <> nil then ! typeName := attr.Value ! else ! typeName := thisType; attr := refNode.Attributes['member']; ! if attr <> nil then ! memberName := attr.Value ! else ! begin ! attr := refNode.Attributes['name']; ! if (attr = nil) and (refNode.Name <> 'typeref') then ! raise Exception.Create('''{0}'' tag requires either the ''name'' or ''member'' attribute'); ! if attr <> nil then ! memberName := attr.Value ! else ! memberName := ''; ! end; ! if (refNode.Name = 'typeref') and (memberName <> '') then ! begin ! typeName := typeName + '.' + memberName; ! memberName := ''; ! end; ! ! attr := refNode.Attributes['reftype']; ! if attr <> nil then ! refToType := (attr.Value = '1') or (attr.Value.ToLower = 'yes') or (attr.Value.ToLower = 'true') else ! refToType := refNode.Name = 'ref'; ! refToType := refToType and (thisType <> typeName) and (memberName <> ''); ! ! if refToType then ! frag.InnerXml := System.String.Format( ! '<see cref="T:{0}" />.<see cref="{2}:{0}.{1}" />', typeName, memberName, canonType) ! else ! if memberName <> '' then ! frag.InnerXml := System.String.Format( ! '<see cref="{2}:{0}.{1}">{3}</see>', [typeName, memberName, canonType, refNode.InnerXml.Trim]) ! else ! frag.InnerXml := System.String.Format( ! '<see cref="{1}:{0}">{2}</see>', typeName, canonType, refNode.InnerXml.Trim); ! ! replaceList.Add(refNode, frag); end; ! for entry in replaceList do ! XmlNode(entry.Key).ParentNode.ReplaceChild(XmlNode(entry.Value), XmlNode(entry.Key)); end; *************** *** 315,319 **** frag := doc.CreateDocumentFragment; frag.InnerXml := System.String.Format('<see langword="true" /> if {0}; <see langword="false" /> otherwise.', ! trueIfNode.InnerText); trueIfNode.ParentNode.InsertBefore(frag, trueIfNode); removeList.Add(trueIfNode); --- 412,416 ---- frag := doc.CreateDocumentFragment; frag.InnerXml := System.String.Format('<see langword="true" /> if {0}; <see langword="false" /> otherwise.', ! trueIfNode.InnerXml); trueIfNode.ParentNode.InsertBefore(frag, trueIfNode); removeList.Add(trueIfNode); |
From: Marcel B. <jed...@us...> - 2005-06-23 18:43:47
|
Update of /cvsroot/jedidotnet/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24373/docs Added Files: Jedi.Timers.Schedules.xml Log Message: Partially done with the Schedules documentation --- NEW FILE: Jedi.Timers.Schedules.xml --- <?xml version="1.0" encoding="utf-8"?> <!--Timestamp most recent auto generation: 2005-06-19 06:13:14 UTC--> <members> <member name="T:Jedi.Timers.DaySchedule"> <summary> Schedule to select single days within an optional parent schedule. </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Day" arg1="day" arg2="days" arg3="64" /> <member name="M:Jedi.Timers.DaySchedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <exclude /> </member> <member name="M:Jedi.Timers.DaySchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.FixedIntervalSchedule"> <summary> </summary> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.#ctor(System.Int64,System.Int64,System.Int64,Jedi.Timers.Schedule[],Jedi.Timers.FixedIntervalSchedule.ParamInTicks)"> <summary> </summary> <param name="start"> </param> <param name="stop"> </param> <param name="span"> </param> <param name="schedules"> </param> <param name="paramsInTicks"> </param> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.CalculateOffset(System.Int64,System.Boolean)"> <summary> </summary> <param name="parentStart"> </param> <param name="isLimit"> </param> <returns> </returns> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.GetLimitsForImpl(System.DateTime,System.DateTime@,System.DateTime@)"> <exclude /> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <exclude /> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.InternalUnitInterval"> <summary> </summary> <returns> </returns> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.Interval"> <summary> </summary> <value> </value> </member> <member name="T:Jedi.Timers.FixedIntervalSchedule.ParamInTicks"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.All"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.Interval"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.Limits"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.None"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.Start"> <summary> </summary> </member> <member name="F:Jedi.Timers.FixedIntervalSchedule.ParamInTicks.Stop"> <summary> </summary> </member> <member name="M:Jedi.Timers.FixedIntervalSchedule.ScheduleLimit"> <exclude /> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.Span"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.Start"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.StartDT"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.Stop"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.FixedIntervalSchedule.StopDT"> <summary> </summary> <value> </value> </member> <member name="T:Jedi.Timers.HourSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Hour" arg1="hour" arg2="hours" arg3="64" /> <member name="M:Jedi.Timers.HourSchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.MillisecondSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Millisecond" arg1="millisecond" arg2="milliseconds" arg3="64" /> <member name="M:Jedi.Timers.MillisecondSchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.MinuteSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Minute" arg1="minute" arg2="minutes" arg3="64" /> <member name="M:Jedi.Timers.MinuteSchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.MonthSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Month" arg1="month" arg2="months" arg3="32" /> <member name="M:Jedi.Timers.MonthSchedule.FromMonths(System.Int32)"> <summary> </summary> <param name="months"> </param> <returns> </returns> </member> <member name="M:Jedi.Timers.MonthSchedule.GetLimitsForImpl(System.DateTime,System.DateTime@,System.DateTime@)"> <exclude /> </member> <member name="M:Jedi.Timers.MonthSchedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <exclude /> </member> <member name="P:Jedi.Timers.MonthSchedule.Interval"> <summary> </summary> <value> </value> </member> <member name="F:Jedi.Timers.MonthSchedule.MaxMonth"> <summary> </summary> </member> <member name="M:Jedi.Timers.MonthSchedule.ScheduleLimit"> <exclude /> </member> <member name="P:Jedi.Timers.MonthSchedule.Start"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.MonthSchedule.Stop"> <summary> </summary> <value> </value> </member> <member name="M:Jedi.Timers.MonthSchedule.ToMonths(System.DateTime)"> <summary> </summary> <param name="date"> </param> <returns> </returns> </member> <member name="T:Jedi.Timers.Schedule"> <summary> Base class used to create complex schedules with varying intervals. </summary> <remarks> <para> Using derivatives of the <see cref="T:Jedi.Timers.Schedule" /> class, you can create any kind of schedule, as simple or as complex as you like. </para> <para> Each schedule will have the ability to add child schedules, thus serving as a date range limiter for these child schedules. A schedule can have multiple children. In cases where two or more child schedules select the exact same date, the first child to do so will be used. This is important to realize if the child schedules also have child schedules, since in that case only the child schedules of the first child schedule will be considered. </para> <para> To avoid the problem above, a defined schedule and its children can be wrapped as a single schedule. By wrapping them as one, you can assign child schedules to the entire selection. This is also useful in cases where a complex selection, with multiple children selecting various ranges, requires complex child selections. Instead of adding identical schedule hierarchies to all base selections, you can wrap the base selection and add one schedule hierarchy as its child. </para> </remarks> </member> <member name="M:Jedi.Timers.Schedule.#ctor(Jedi.Timers.Schedule[])"> <summary> Initializes a new instance of the <see-class /> class. </summary> <param name="schedules"> Child schedules to add to the schedule immediately. </param> </member> <member name="M:Jedi.Timers.Schedule.AddSchedule(Jedi.Timers.Schedule)"> <overloads> Adds one or more schedules as children of this schedule. </overloads> <summary> Adds a schedule as a child of this schedule. </summary> <param name="schedule"> The schedule to add as a child of this schedule. </param> </member> <member name="M:Jedi.Timers.Schedule.AddSchedule(Jedi.Timers.Schedule[])"> <summary> Adds several schedules as child schedules of this schedule. </summary> <param name="schedules"> The schedules to add as children of this schedule. </param> </member> <member name="E:Jedi.Timers.Schedule.Changed"> <summary> The event that is raised when the schedule has been changed. </summary> </member> <member name="M:Jedi.Timers.Schedule.ClearSchedules"> <summary> Removes all child schedules. </summary> </member> <member name="P:Jedi.Timers.Schedule.ContainedSchedules"> <summary> The internal list of child schedules. </summary> <value> An <see cref="T:System.Collections.ArrayList" /> containing all child schedules. </value> <remarks> Derivatives should not modify this list; instead use the <see cref="M:Jedi.Timers.Schedule.AddSchedule" />, <see cref="M:Jedi.Timers.Schedule.ClearSchedules" /> and <see cref="M:Jedi.Timers.Schedule.RemoveSchedule(Jedi.Timers.Schedule)" /> methods. </remarks> </member> <member name="T:Jedi.Timers.Schedule.Enumerator"> <summary> </summary> </member> <member name="M:Jedi.Timers.Schedule.Enumerator.#ctor(Jedi.Timers.Schedule,System.DateTime,System.Boolean)"> <summary> Initializes a new instance of the <see-class /> class. </summary> <param name="owner"> The <see cref="T:Jedi.Timers.Schedule" /> instance to which this enumerator belongs. </param> <param name="from"> A <see cref="T:System.DateTime" /> indicating the starting point of the enumerator. Note that this should be greater than <ref type="System.DateTime" member="MinValue" memberType="F" />. </param> <param name="recursive"> <true-if> the child schedules should be considered when enumerating</true-if> </param> </member> <member name="M:Jedi.Timers.Schedule.Enumerator.Clone"> <exclude /> </member> <member name="M:Jedi.Timers.Schedule.Enumerator.get_Current"> <exclude /> </member> <member name="M:Jedi.Timers.Schedule.Enumerator.MoveNext"> <exclude /> </member> <member name="P:Jedi.Timers.Schedule.Enumerator.Owner"> <summary> Indicates the owning <see cref="T:Jedi.Timers.Schedule" /> of the enumerator. </summary> <value> A reference to a <see cref="T:jedi.Timers.Schedule" /> derivative that is the owner of the enumerator. </value> </member> <member name="M:Jedi.Timers.Schedule.Enumerator.Reset"> <exclude /> </member> <member name="F:Jedi.Timers.Schedule.FVersion"> <summary> The internal version of the schedule. </summary> <remarks> This field is used internally by the enumerator to check whether the schedule has changed since the enumerator was first created. The value is incremented upon each call to <see cref="M:Jedi.Timers.Schedule.Modified" />, which in turn is called automatically when one of the schedule properties are changed. </remarks> </member> <member name="M:Jedi.Timers.Schedule.GetEnumerator"> <overloads> Retrieves an enumerator to enumerate through the list of scheduled dates and times. </overloads> <summary> Retrieves an enumerator to enumerate through the list of scheduled dates and times as specified in the entire schedule hierarchy. </summary> <returns> An <see cref="T:System.Collections.IEnumerator" /> that is the requested enumerator. </returns> </member> <member name="M:Jedi.Timers.Schedule.GetEnumerator(System.Boolean)"> <summary> Retrieves an enumerator to enumerate through the list of scheduled dates and times, optionally include the entire schedule hierarchy. </summary> <param name="recursive"> <see langword="true" /> if the entire schedule hierarchy should be enumerated. <see langword="false" /> if only the date and times of this schedule should be enumerated. </param> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetEnumerator"]/returns' /> </member> <member name="M:Jedi.Timers.Schedule.GetEnumerator(System.DateTime)"> <summary> Retrieves an enumerator to enumerate through the list of scheduled dates and times as specified in the entire schedule hierarchy, starting at a specific date/time. </summary> <param name="from"> </param> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetEnumerator"]/returns' /> </member> <member name="M:Jedi.Timers.Schedule.GetEnumerator(System.DateTime,System.Boolean)"> <summary> Retrieves an enumerator to enumerate through the list of scheduled dates and times, optionally include the entire schedule hierarchy, starting at a specific date/time. </summary> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetEnumerator(System.DateTime)"]/param[@name="from"]' /> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetEnumerator(System.Boolean)"]/param[@name="recursive"]' /> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetEnumerator"]/returns' /> </member> <member name="M:Jedi.Timers.Schedule.GetLimitsFor(System.DateTime,System.DateTime@,System.DateTime@)"> <summary> Determines the selection range for child schedules, considering all parent schedules. </summary> <param name="date"> The date for which to determine the selection range. </param> <param name="start"> <para> Upon return, a <see cref="T:System.DateTime" /> indicating the start of this schedules selection range </para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MaxValue" /> if the date does not lie within the schedule's defined range. </para> </param> <param name="stop"> <para> Upon return, a <see cref="T:System.DateTime" /> indicating the end of this schedules selection range </para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MaxValue" /> if the date does not lie within the schedule's defined range. </para> </param> </member> <member name="M:Jedi.Timers.Schedule.GetLimitsForImpl(System.DateTime,System.DateTime@,System.DateTime@)"> <summary> Determines the selection range for child schedules, considering this schedule only. </summary> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetLimitsFor(System.DateTime,System.DateTime@,System.DateTime@)"]/param[@name="date"]' /> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetLimitsFor(System.DateTime,System.DateTime@,System.DateTime@)"]/param[@name="start"]' /> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.GetLimitsFor(System.DateTime,System.DateTime@,System.DateTime@)"]/param[@name="stop"]' /> <remarks> <para> Inheritors should implement this method in such a way that if <paramref name="date" /> lies before the first selection, or in between two selections, the next available selection range is returned. </para> <para> Even though this method will return a range based on this schedule only, in most scenarios any parent schedules will have to be consulted to determine the selection range for this schedule. However, the returned range may start before or end after the parent selection. This allows cases where the selection start, which influences child schedules, lies before the parent's selection, eg. when selecting week numbers, which may start a few days before the first of the month. Actually selected dates (as returned by <see cref="M:Jedi.Timers.Schedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)" />) will always be limited to the limits imposed by all parent schedules. </para> </remarks> </member> <member name="M:Jedi.Timers.Schedule.GetNext(System.DateTime,System.Boolean)"> <summary> Retrieves the next date in the schedule from a given date. </summary> <param name="from"> The minimum date to retrieve. The returned value is guaranteed to be greater than or equal to this date. </param> <param name="recursive"> Flag to indicate whether child schedules are to be considered (<see langword="true" />) or not (<see langword="false" />) </param> <returns> <para>A <see cref="T:System.DateTime" /> of the next date according to the schedule or its hierarchy</para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MaxValue" /> if no more dates follow the one specified by the <paramref name="from" /> parameter. </para> </returns> <seealso cref="M:Jedi.Timers.Schedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)" /> </member> <member name="M:Jedi.Timers.Schedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <summary> Retrieves the next date of this schedule. </summary> <param name="date"> The minimum date to retrieve. </param> <param name="offset"> <para>The starting date of the parent schedule</para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MinValue" /> if the schedule doesn't have a parent schedule. </para> </param> <param name="maxDate"> <para>The end date of the parent schedule</para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MaxValue" /> if the schedule doesn't have a parent schedule. </para> <para> Implementers are not required to adjust the return value if it happens to be greater than this parameter. </para> </param> <returns> <para>A <see cref="T:System.DateTime" /> representing the next date of this schedule</para> <para>-or-</para> <para> <see cref="T:System.DateTime" />.<see cref="F:System.DateTime.MaxValue" /> if the schedule doesn't have a next date. </para> </returns> <remarks> <para> Inheritors should implement this method to return the next date for this schedule, ignoring any child schedules that may have been assigned. The value should not be smaller that the one specified by the <paramref name="offset" /> parameter or the one specified by the <paramref name="date" /> parameter. </para> <para> Normally, the date returned by this method should be the same as the one returned in the start parameter of the <see cref="M:Jedi.Timers.Schedule.GetLimitsForImpl(System.DateTime,System.DateTime@,System.DateTime@)" /> method. </para> </remarks> <seealso cref="M:Jedi.Timers.Schedule.GetNext(System.DateTime,System.Boolean)" /> </member> <member name="M:Jedi.Timers.Schedule.IsValidDate(System.DateTime)"> <summary> Determines whether the specified date is a valid date for this schedule. </summary> <param name="date"> The date to check for validity. </param> <returns> <see langword="true" /> if the date specified by the <paramref name="date" /> parameter is valid for this schedule; <see langword="false" /> otherwise. </returns> </member> <member name="M:Jedi.Timers.Schedule.Modified"> <summary> Marks the schedule as changed. </summary> <remarks> <para> This method will increment the <see cref="F:Jedi.Timers.Schedules.Schedule.FVersion" /> field and call the <see cref="M:Jedi.Timers.Schedules.Schedule.OnChanged" /> method. </para> <para> Derivatives should call this method from every property setter that might change the list of scheduled dates. </para> </remarks> </member> <member name="M:Jedi.Timers.Schedule.OnChanged"> <summary> Raises the <see cref="E:Jedi.Timers.Schedule.Changed" /> event. </summary> </member> <member name="P:Jedi.Timers.Schedule.Parent"> <summary> Reference to the parent (owner) of this schedule. </summary> <value> <para>The <see cref="T:Jedi.Timers.Schedule" /> (or derivative) that is the owner of this schedule</para> <para>-or-</para> <para><see langword="null" /> if this schedule is at the root of the hierarchy.</para> </value> </member> <member name="M:Jedi.Timers.Schedule.RemoveSchedule(Jedi.Timers.Schedule)"> <summary> Removes a schedule from the list of child schedules. </summary> <param name="schedule"> The schedule to remove from the list of child schedules. </param> </member> <member name="M:Jedi.Timers.Schedule.RemoveScheduleAt(System.Int32)"> <summary> Removes a schedule from the list of child schedules. </summary> <param name="index"> The zero-based index of the schedule to remove from the list of child schedules. </param> </member> <member name="M:Jedi.Timers.Schedule.RemoveSchedulesInRange(System.Int32,System.Int32)"> <summary> Removes a range of schedules from the list of child schedules. </summary> <param name="index"> The zero-based index of the first schedule to remove from the list of child schedules. </param> <param name="count"> The number of schedules to remove from the list of child schedules. </param> </member> <member name="P:Jedi.Timers.Schedule.Schedule(System.Int32)"> <summary> Retrieves a reference to a child schedule. </summary> <param name="index"> The zero-based index of the child schedule to retrieve. </param> <value> A reference to a <see cref="T:Jedi.Timers.Schedule" /> derivative that is the specified child schedule. </value> </member> <member name="P:Jedi.Timers.Schedule.ScheduleCount"> <summary> Contains the number of child schedules. </summary> <value> An <see cref="T:System.Int32" /> indicating how many child schedules have been assigned to this schedule. </value> </member> <member name="M:Jedi.Timers.Schedule.ScheduleLimit"> <summary> Indicates the maximum time span this schedule will select for its child schedules. </summary> <returns> A <see cref="T:System.TimeSpan" /> indicating the maximum time span the schedule will select for its child schedules. </returns> <remarks> Derivatives will need to specify the amount of time this schedule will select. The value returned is used to determine whether one schedule class can be a child of another schedule class. Child schedules can only be assigned when their maximum time span is less than that of their prospective parent schedule. </remarks> </member> <member name="M:Jedi.Timers.Schedule.SetParent(Jedi.Timers.Schedule)"> <summary> Sets the parent schedule for this schedule. </summary> <param name="schedule"> The schedule to set as parent. </param> <remarks> This method is called internally when a schedule is added to the list of child schedules of another schedule. </remarks> </member> <member name="M:Jedi.Timers.Schedule.Wrap(Jedi.Timers.Schedule)"> <overloads> Wraps a schedule hierarchy as a single schedule. </overloads> <summary> Wraps a schedule hierarchy as a single schedule. </summary> <remarks> <para> Wrapping a schedule hierarchy as a single hierarchy is often used when a complex hierarchy is defined to select a certain range, but each of selections in that range requires the exact same child selections. </para> <para> For example, suppose you want to select every 15 minutes in every 4 hours of every odd day of the odd months and every 15 minutes in every 4 hours of every even day of the even months. To do this, you would define the schedule hierarchy for selecting the appropriate months and days, pass it to the Wrap method and add the schedule hierarchy for selecting the appropriate hours and months to the returned schedule. </para> </remarks> <param name="scheduleHierarchy"> The schedule hierarchy to wrap as a single schedule. </param> <returns> A reference to a <see cref="T:Jedi.Timers.Schedule" /> derivative that represents the wrapped hierarchy. </returns> </member> <member name="M:Jedi.Timers.Schedule.Wrap(Jedi.Timers.Schedule,Jedi.Timers.Schedule[])"> <summary> Wraps a schedule hierarchy as a single schedule and adds the specified child schedules. </summary> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.Wrap(Jedi.Timers.Schedule)"]/param[@name="scheduleHierarchy"]' /> <param name="schedules"> The schedules to add as children of the wrapped schedule. </param> <include file='Jedi.Timers.Schedules.xml' path='/members/member[@name="M:Jedi.Timers.Schedule.Wrap(Jedi.Timers.Schedule)"]/returns' /> </member> <member name="T:Jedi.Timers.ScheduleException"> <summary> The exception that is thrown when an error with <see cref="T:Jedi.Timers.Schedule">schedules</see> occurs. </summary> </member> <member name="M:Jedi.Timers.ScheduleException.#ctor"> <exclude /> </member> <member name="M:Jedi.Timers.ScheduleException.#ctor(System.String)"> <exclude /> </member> <member name="M:Jedi.Timers.ScheduleException.#ctor(System.String,System.Exception)"> <exclude /> </member> <member name="T:Jedi.Timers.SecondSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Second" arg1="second" arg2="seconds" arg3="64" /> <member name="M:Jedi.Timers.SecondSchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.TickSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Tick" arg1="tick (100 nanoseconds)" arg2="ticks (multiples of 100 nanoseconds)" arg3="64" /> <member name="M:Jedi.Timers.TickSchedule.InternalUnitInterval"> <exclude /> </member> <member name="T:Jedi.Timers.WeekSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Week" arg1="week" arg2="weeks" arg3="64" /> <member name="P:Jedi.Timers.WeekSchedule.FirstDayOfWeek"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.WeekSchedule.FirstPartialWeek"> <summary> </summary> <value> </value> </member> <member name="M:Jedi.Timers.WeekSchedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <exclude /> </member> <member name="M:Jedi.Timers.WeekSchedule.InternalUnitInterval"> <exclude /> </member> <member name="P:Jedi.Timers.WeekSchedule.LastPartialWeek"> <summary> </summary> <value> </value> </member> <member name="T:Jedi.Timers.WeekSchedule.PartialWeekOption"> <summary> </summary> </member> <member name="F:Jedi.Timers.WeekSchedule.PartialWeekOption.Allowed"> <summary> </summary> </member> <member name="F:Jedi.Timers.WeekSchedule.PartialWeekOption.ForChildSchedulesOnly"> <summary> </summary> </member> <member name="F:Jedi.Timers.WeekSchedule.PartialWeekOption.NotAllowed"> <summary> </summary> </member> <member name="T:Jedi.Timers.YearSchedule"> <summary> </summary> </member> <include file='snippets\Jedi.Timers.Schedules.xml' path='/snippets/ScheduleCommonMembers/*' arg0="Year" arg1="year" arg2="years" arg3="32" /> <member name="M:Jedi.Timers.YearSchedule.GetLimitsForImpl(System.DateTime,System.DateTime@,System.DateTime@)"> <exclude /> </member> <member name="M:Jedi.Timers.YearSchedule.GetNextImpl(System.DateTime,System.DateTime,System.DateTime)"> <exclude /> </member> <member name="P:Jedi.Timers.YearSchedule.Interval"> <summary> </summary> <value> </value> </member> <member name="M:Jedi.Timers.YearSchedule.ScheduleLimit"> <exclude /> </member> <member name="P:Jedi.Timers.YearSchedule.Start"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Timers.YearSchedule.Stop"> <summary> </summary> <value> </value> </member> </members> |
From: Marcel B. <jed...@us...> - 2005-06-23 18:43:46
|
Update of /cvsroot/jedidotnet/docs/snippets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24373/docs/snippets Added Files: Jedi.Timers.Schedules.xml Log Message: Partially done with the Schedules documentation --- NEW FILE: Jedi.Timers.Schedules.xml --- <snippets> <!-- interval parameter snippet arg0 = unit interval in plural form (eg. days, weeks or months) --> <ParamInterval> <param name="interval"> The interval in {0} between selected dates. </param> </ParamInterval> <!-- schedules parameter snippet --> <ParamSchedules> <param name="schedules"> The schedules to add as children. </param> </ParamSchedules> <!-- start parameter snippet arg0 = unit interval in plural form (eg. days, weeks or months) --> <ParamStart> <param name="start"> The start offset in {0} from the start of the parent schedule's current selection. Specify 0 (zero) to start immediately at the start of the parent schedule's current selection (ie. no starting limitation). </param> </ParamStart> <!-- stop parameter snippet arg0 = unit interval in plural form (eg. days, weeks or months) --> <ParamStop> <param name="stop"> The end offset in {0} from the <b>start</b> of the parent schedule's current selection. Specify 0 (zero) to end where the parent schedule's current selection ends (ie. no ending limitation). If this value is less than <paramref name="start" /> but greater than zero, it will assume the schedule will be a one-shot, and thus ends the moment it starts. </param> </ParamStop> <!-- Schedule common members snippet arg0 = class name (only the part before the Schedule suffix, so Day, Week, Month, etc) arg1 = interval unit (eg. day, week or month) arg2 = interval unit in plural form (eg. days, weeks or months) arg3 = bit size of integer parameters (either 32 or 64) --> <ScheduleCommonMembers> <member name="M:Jedi.Timers.{0}Schedule.#ctor"> <overloads> <ctor /> </overloads> <summary> <ctor /> </summary> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(Jedi.Timers.Schedule[])"> <summary> <ctor>specifying a list of child schedules</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamSchedules/*' /> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3})"> <summary> <ctor>specifying an interval in {2}</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamInterval/*' arg0="{2}"/> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3},Jedi.Timers.Schedule[])"> <summary> <ctor>specifying an interval in {2} and a list of child schedules</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamInterval/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamSchedules/*' /> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3},System.Int{3})"> <summary> <ctor>specifying a start and end offset in {2}</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStart/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStop/*' arg0="{2}"/> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3},System.Int{3},Jedi.Timers.Schedule[])"> <summary> <ctor>specifying a start and end offset in {2} and a list of child schedules</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStart/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStop/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamSchedules/*' /> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3},System.Int{3},System.Int{3})"> <summary> <ctor>specifying an interval, a start and end offset (all in {2})</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamInterval/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStart/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStop/*' arg0="{2}"/> </member> <member name="M:Jedi.Timers.{0}Schedule.#ctor(System.Int{3},System.Int{3},System.Int{3},Jedi.Timers.Schedule[])"> <summary> <ctor>specifying an interval, a start and end offset (all in {2}) and a list of child schedules</ctor> </summary> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamInterval/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStart/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamStop/*' arg0="{2}"/> <include file='Jedi.Timers.Schedules.xml' path='/snippets/ParamSchedules/*' /> </member> </ScheduleCommonMembers> </snippets> |
From: Marcel B. <jed...@us...> - 2005-06-23 18:42:29
|
Update of /cvsroot/jedidotnet/docs/snippets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23760/snippets Log Message: Directory /cvsroot/jedidotnet/docs/snippets added to the repository |
From: Marcel B. <jed...@us...> - 2005-06-23 17:28:36
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19995/tools/JediDoc/source Modified Files: JediDoc.System.Xml.AssemblyDocGeneration.pas Log Message: Adapted to the fact that the fileList cache now stores the full path and file names. Index: JediDoc.System.Xml.AssemblyDocGeneration.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.AssemblyDocGeneration.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JediDoc.System.Xml.AssemblyDocGeneration.pas 19 Jun 2005 16:00:18 -0000 1.3 --- JediDoc.System.Xml.AssemblyDocGeneration.pas 23 Jun 2005 17:28:28 -0000 1.4 *************** *** 170,184 **** class function AssemblyDocs.InputXmlFile(filename: string): XmlDocument; var savedDir: string; begin ! Result := XmlDocument(FInDocs[filename]); if not Assigned(Result) then begin Result := XmlDocument.Create; ! Result.Load(filename); ! FInDocs.Add(filename, Result); savedDir := Environment.CurrentDirectory; try ! Environment.CurrentDirectory := Path.GetDirectoryName(filename); XmlUtils.ExpandIncludeNodes(Result, FInDocs); finally --- 170,186 ---- class function AssemblyDocs.InputXmlFile(filename: string): XmlDocument; var + fi: FileInfo; savedDir: string; begin ! fi := FileInfo.Create(filename); ! Result := XmlDocument(FInDocs[fi.FullName]); if not Assigned(Result) then begin Result := XmlDocument.Create; ! Result.Load(fi.FullName); ! FInDocs.Add(fi.FullName, Result); savedDir := Environment.CurrentDirectory; try ! Environment.CurrentDirectory := fi.DirectoryName; XmlUtils.ExpandIncludeNodes(Result, FInDocs); finally *************** *** 220,230 **** var childNode: XmlNode; ! translationList: SortedList; begin ! translationList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! translationList.Add('<see-ns />', System.String.Format('<see cref="N:{0}" />', member.NameSpace)); ! translationList.Add('<see-class />', System.String.Format('<see cref="T:{0}.{1}" />', member.NameSpace, member.TypeName)); ! translationList.Add('<see-self />', System.String.Format('<see cref="{0}" />', canonicalName)); ! XmlUtils.Replace(XmlElement(memberNode), translationList); FWriter.WriteStartElement('member'); --- 222,232 ---- var childNode: XmlNode; ! replacementList: SortedList; begin ! replacementList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! replacementList.Add('<see-ns />', System.String.Format('<see cref="N:{0}" />', member.NameSpace)); ! replacementList.Add('<see-class />', System.String.Format('<see cref="T:{0}.{1}" />', member.NameSpace, member.TypeName)); ! replacementList.Add('<see-self />', System.String.Format('<see cref="{0}" />', canonicalName)); ! XmlUtils.Replace(XmlElement(memberNode), replacementList); FWriter.WriteStartElement('member'); |
From: Marcel B. <jed...@us...> - 2005-06-23 17:27:20
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19314/tools/JediDoc/source Modified Files: JediDoc.System.Xml.Reflection.pas Log Message: * Changed remaining instances of 'translationList' to 'replacementList' * Added: custom tag 'ctor'. It will automatically generate the common text for a constructor. If the <ctor> tag contains something, the contents of the <ctor> tag is appended to the common contructor text (which will have a comma at the end in this case). * Modified: include expansion now also happens at the highest level. Previously this would only happen once inside a <member> tag. Index: JediDoc.System.Xml.Reflection.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.Reflection.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JediDoc.System.Xml.Reflection.pas 19 Jun 2005 16:00:18 -0000 1.3 --- JediDoc.System.Xml.Reflection.pas 23 Jun 2005 17:27:11 -0000 1.4 *************** *** 41,47 **** {$REGION 'Private static methods'} strict private ! class function GetParameterNames(doc: XmlDocument): StringArray; static; ! class function GetParameters(doc: XmlDocument): XmlNodeList; static; ! class procedure ProcessXmlMember(reader: XmlReader; filePath: string; docs: DocOverview; fileList: HashTable); static; {$ENDREGION} --- 41,47 ---- {$REGION 'Private static methods'} strict private ! class function GetParameterNames(member: XmlElement): StringArray; static; ! class function GetParameters(member: XmlElement): XmlNodeList; static; ! class procedure ProcessXmlMember(member: XmlElement; filePath: string; docs: DocOverview; fileList: HashTable); static; {$ENDREGION} *************** *** 62,65 **** --- 62,66 ---- {$REGION 'Custom tag processing methods'} strict private + class procedure ProcessCtor(doc: XmlDocument); static; class procedure ProcessRef(doc: XmlDocument); static; class procedure ProcessTrueIf(doc: XmlDocument); static; *************** *** 67,74 **** {$REGION 'Static methods'} public class procedure CustomTagProcessing(doc: XmlDocument); static; class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; class procedure Replace(element: XmlElement); overload; static; ! class procedure Replace(element: XmlElement; translationList: IDictionary); overload; static; class procedure ReplaceCommonMemberReferences(element: XmlElement); static; {$ENDREGION} --- 68,76 ---- {$REGION 'Static methods'} public + class function GetDocument(path: string; fileList: HashTable): XmlDocument; static; class procedure CustomTagProcessing(doc: XmlDocument); static; class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; class procedure Replace(element: XmlElement); overload; static; ! class procedure Replace(element: XmlElement; replacementList: IDictionary); overload; static; class procedure ReplaceCommonMemberReferences(element: XmlElement); static; {$ENDREGION} *************** *** 81,85 **** {$REGION 'XmlReflector'} ! class function XmlReflector.GetParameterNames(doc: XmlDocument): StringArray; var paramList: XmlNodeList; --- 83,87 ---- {$REGION 'XmlReflector'} ! class function XmlReflector.GetParameterNames(member: XmlElement): StringArray; var paramList: XmlNodeList; *************** *** 87,91 **** node: XmlNode; begin ! paramList := GetParameters(doc); nameList := ArrayList.Create(paramList.Count); for node in paramList do --- 89,93 ---- node: XmlNode; begin ! paramList := GetParameters(member); nameList := ArrayList.Create(paramList.Count); for node in paramList do *************** *** 94,100 **** end; ! class function XmlReflector.GetParameters(doc: XmlDocument): XmlNodeList; begin ! Result := doc.GetElementsByTagName('param'); end; --- 96,102 ---- end; ! class function XmlReflector.GetParameters(member: XmlElement): XmlNodeList; begin ! Result := member.SelectNodes('param'); end; *************** *** 102,171 **** var fileList: HashTable; ! savedDirectory: string; ! xr: XmlReader; begin ! savedDirectory := System.Environment.CurrentDirectory; ! xr := XmlTextReader.Create(StreamReader.Create(path)); ! try ! System.Environment.CurrentDirectory := System.IO.Path.GetDirectoryName(System.IO.Path.GetFullPath(path)); fileList := Hashtable.Create(CaseInsensitiveHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant); ! if System.IO.Path.GetFileNameWithoutExtension(path).ToLower.StartsWith('namespacedoc.') then ! begin ! docs.AddXmlMember('N:' + System.IO.path.GetFileNameWithoutExtension(path).Substring('namespacedoc.'.Length), ! path, [], False); ! end ! else ! begin ! if xr.MoveToContent = XmlNodeType.Element then ! begin ! xr.ReadStartElement('members'); ! while xr.IsStartElement do ! begin ! if xr.IsStartElement('member') then ! ProcessXmlMember(xr, path, docs, fileList) ! else ! xr.Skip; ! end; ! xr.ReadEndElement; ! end; ! end; ! finally ! xr.Close; // release the file ! System.Environment.CurrentDirectory := savedDirectory; end; end; ! class procedure XmlReflector.ProcessXmlMember(reader: XmlReader; filePath: string; docs: DocOverview; fileList: HashTable); var - line: Integer; - pos: Integer; memberId: string; - tmpXml: string; - doc: XmlDocument; params: array of string; begin ! if reader is XmlTextReader then ! begin ! line := XmlTextReader(reader).LineNumber; ! pos := XmlTextReader(reader).LinePosition; ! end else ! begin ! line := 0; ! pos := 0; ! end; ! memberId := reader.GetAttribute('name'); ! if memberId = '' then ! raise Exception.Create(System.String.Format('Nameless member found. File ''{0}'', Line {1}, column {2}', ! filePath, line, pos)); ! doc := XmlDocument.Create; ! tmpXml := reader.ReadOuterXml; ! doc.LoadXml(tmpXml); ! XmlUtils.ExpandIncludeNodes(doc, fileList); ! params := GetParameterNames(doc); ! docs.AddXmlMember(memberId, filePath, params, Assigned(doc.DocumentElement.SelectSingleNode('exclude'))); ! reader.Skip; end; {$ENDREGION} --- 104,137 ---- var fileList: HashTable; ! doc: XmlDocument; ! memberNode: XmlNode; begin ! if System.IO.Path.GetFileNameWithoutExtension(path).ToLower.StartsWith('namespacedoc.') then ! begin ! docs.AddXmlMember('N:' + System.IO.path.GetFileNameWithoutExtension(path).Substring('namespacedoc.'.Length), ! path, [], False); ! end ! else ! begin fileList := Hashtable.Create(CaseInsensitiveHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant); ! doc := XmlUtils.GetDocument(path, fileList); ! for memberNode in doc.SelectNodes('/members/member') do ! ProcessXmlMember(XmlElement(memberNode), path, docs, fileList); end; end; ! class procedure XmlReflector.ProcessXmlMember(member: XmlElement; filePath: string; docs: DocOverview; fileList: HashTable); var memberId: string; params: array of string; begin ! if member.Attributes['name'] <> nil then ! memberId := member.Attributes['name'].Value else ! raise Exception.Create('Nameless member found.'); ! params := GetParameterNames(member); ! docs.AddXmlMember(memberId, filePath, params, Assigned(member.SelectSingleNode('exclude'))); end; {$ENDREGION} *************** *** 174,177 **** --- 140,144 ---- class procedure XmlUtils.CustomTagProcessing(doc: XmlDocument); begin + ProcessCtor(doc); ProcessRef(doc); ProcessTrueIf(doc); *************** *** 201,204 **** --- 168,173 ---- raise Exception.Create('Missing ''path'' attribute in the ''include'' tag'); includedNodes := GetIncludedNodes(fileAttr.Value, pathAttr.Value, fileList); + if includedNodes.Count = 0 then + Console.WriteLine('Warning: nothing included for tag {0}', includeNode.OuterXml); for includedNode in includedNodes do begin *************** *** 213,231 **** end; ! class function XmlUtils.GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; var ! doc: XmlDocument; begin ! if fileList.ContainsKey(filename) then ! Result := XmlDocument(fileList[filename]).SelectNodes(xpath) else begin ! doc := XmlDocument.Create; ! doc.PreserveWhitespace := True; ! doc.Load(filename); ! fileList.Add(filename, doc); ! ExpandIncludeNodes(doc, fileList); ! Result := doc.SelectNodes(xpath); end; end; --- 182,236 ---- end; ! class function XmlUtils.GetDocument(path: string; fileList: HashTable): XmlDocument; var ! fi: FileInfo; ! savePath: string; begin ! fi := FileInfo.Create(path); ! if fileList.ContainsKey(fi.FullName) then ! Result := XmlDocument(fileList[fi.FullName]) else begin ! Result := XmlDocument.Create; ! Result.PreserveWhitespace := True; ! Result.Load(fi.FullName); ! savePath := Environment.CurrentDirectory; ! try ! Environment.CurrentDirectory := fi.DirectoryName; ! fileList.Add(fi.FullName, Result); ! ExpandIncludeNodes(Result, fileList); ! finally ! Environment.CurrentDirectory := savePath; ! end; ! end; ! end; ! ! class function XmlUtils.GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; ! begin ! Result := GetDocument(filename, fileList).SelectNodes(xpath); ! end; ! ! class procedure XmlUtils.ProcessCtor(doc: XmlDocument); ! var ! removeList: ArrayList; ! ctorNode: XmlNode; ! frag: XmlDocumentFragment; ! obj: &Object; ! begin ! removeList := ArrayList.Create; ! for ctorNode in doc.GetElementsByTagName('ctor') do ! begin ! frag := doc.CreateDocumentFragment; ! if ctorNode.InnerText.Trim.Length = 0 then ! frag.InnerXml := 'Initializes a new instance of the <see-class /> class.' ! else ! frag.InnerXml := System.String.Format( ! 'Initializes a new instance of the <see-class /> class, {0}.', ! ctorNode.InnerText.Trim); ! ctorNode.ParentNode.InsertBefore(frag, ctorNode); ! removeList.Add(ctorNode); end; + for obj in removeList do + XmlNode(obj).ParentNode.RemoveChild(XmlNode(obj)); end; *************** *** 326,342 **** end; ! class procedure XmlUtils.Replace(element: XmlElement; translationList: IDictionary); var ! nodeInner: string; entry: DictionaryEntry; begin if element = nil then raise ArgumentNullException.Create('element'); ! if translationList = nil then ! raise ArgumentNullException.Create('translationList'); ! nodeInner := element.InnerXml; ! for entry in translationList do ! nodeInner := nodeInner.Replace(string(entry.Key), string(entry.Value)); ! element.InnerXml := nodeInner; end; --- 331,355 ---- end; ! class procedure XmlUtils.Replace(element: XmlElement; replacementList: IDictionary); var ! content: string; entry: DictionaryEntry; + xmlAttr: XmlAttribute; begin if element = nil then raise ArgumentNullException.Create('element'); ! if replacementList = nil then ! raise ArgumentNullException.Create('replacementList'); ! content := element.InnerXml; ! for entry in replacementList do ! content := content.Replace(string(entry.Key), string(entry.Value)); ! element.InnerXml := content; ! for xmlAttr in element.Attributes do ! begin ! content := xmlAttr.Value; ! for entry in replacementList do ! content := content.Replace(string(entry.Key), string(entry.Value)); ! xmlAttr.Value := content; ! end; end; |
From: Marcel B. <jed...@us...> - 2005-06-22 18:30:41
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31631/main/run Modified Files: Jedi.Timers.Schedules.pas Log Message: Bug fix: FixedIntervalSchedule would set FStart to the end date in the (hypothethical) case were the stop parameter would be specified in ticks (paramsInTicks parameter would contain ParamsInTicks.Stop flag). Index: Jedi.Timers.Schedules.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Timers.Schedules.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Timers.Schedules.pas 16 Jun 2005 13:13:55 -0000 1.1 --- Jedi.Timers.Schedules.pas 22 Jun 2005 18:30:32 -0000 1.2 *************** *** 617,621 **** end else ! FStart := DateTime.Create(stop); if paramsInTicks and ParamInTicks.Interval = ParamInTicks.None then --- 617,621 ---- end else ! FStop := DateTime.Create(stop); if paramsInTicks and ParamInTicks.Interval = ParamInTicks.None then |
From: Marcel B. <jed...@us...> - 2005-06-19 16:00:26
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10380/tools/JediDoc/source Modified Files: JediDoc.System.Xml.AssemblyDocGeneration.pas JediDoc.System.Xml.Reflection.pas Log Message: Changed 'Translate' (and similar) to 'Replace' (and similar) throughout the source as it better describes the process Index: JediDoc.System.Xml.AssemblyDocGeneration.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.AssemblyDocGeneration.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JediDoc.System.Xml.AssemblyDocGeneration.pas 19 Jun 2005 14:49:38 -0000 1.2 --- JediDoc.System.Xml.AssemblyDocGeneration.pas 19 Jun 2005 16:00:18 -0000 1.3 *************** *** 226,230 **** translationList.Add('<see-class />', System.String.Format('<see cref="T:{0}.{1}" />', member.NameSpace, member.TypeName)); translationList.Add('<see-self />', System.String.Format('<see cref="{0}" />', canonicalName)); ! XmlUtils.Translate(XmlElement(memberNode), translationList); FWriter.WriteStartElement('member'); --- 226,230 ---- translationList.Add('<see-class />', System.String.Format('<see cref="T:{0}.{1}" />', member.NameSpace, member.TypeName)); translationList.Add('<see-self />', System.String.Format('<see cref="{0}" />', canonicalName)); ! XmlUtils.Replace(XmlElement(memberNode), translationList); FWriter.WriteStartElement('member'); Index: JediDoc.System.Xml.Reflection.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.Reflection.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JediDoc.System.Xml.Reflection.pas 19 Jun 2005 14:49:38 -0000 1.2 --- JediDoc.System.Xml.Reflection.pas 19 Jun 2005 16:00:18 -0000 1.3 *************** *** 58,62 **** strict private class function GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; static; ! class procedure ProcessIncludeTranslations(importedNode, includeNode: XmlNode); static; {$ENDREGION} {$REGION 'Custom tag processing methods'} --- 58,62 ---- strict private class function GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; static; ! class procedure ProcessIncludeReplacements(importedNode, includeNode: XmlNode); static; {$ENDREGION} {$REGION 'Custom tag processing methods'} *************** *** 69,75 **** class procedure CustomTagProcessing(doc: XmlDocument); static; class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; ! class procedure Translate(element: XmlElement); overload; static; ! class procedure Translate(element: XmlElement; translationList: IDictionary); overload; static; ! class procedure TranslateCommonMemberReferences(element: XmlElement); static; {$ENDREGION} end; --- 69,75 ---- class procedure CustomTagProcessing(doc: XmlDocument); static; class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; ! class procedure Replace(element: XmlElement); overload; static; ! class procedure Replace(element: XmlElement; translationList: IDictionary); overload; static; ! class procedure ReplaceCommonMemberReferences(element: XmlElement); static; {$ENDREGION} end; *************** *** 205,209 **** importedNode := doc.ImportNode(includedNode, True); includeNode.ParentNode.InsertBefore(importedNode, includeNode); ! ProcessIncludeTranslations(importedNode, includeNode); end; removeList.Add(includeNode); --- 205,209 ---- importedNode := doc.ImportNode(includedNode, True); includeNode.ParentNode.InsertBefore(importedNode, includeNode); ! ProcessIncludeReplacements(importedNode, includeNode); end; removeList.Add(includeNode); *************** *** 230,242 **** end; ! class procedure XmlUtils.ProcessIncludeTranslations(importedNode, includeNode: XmlNode); var customList: SortedList; attr: XmlAttribute; argNum: Integer; ! translateNode: XmlNode; begin customList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! // retrieve {0} type argument translations. for attr in includeNode.Attributes do begin --- 230,242 ---- end; ! class procedure XmlUtils.ProcessIncludeReplacements(importedNode, includeNode: XmlNode); var customList: SortedList; attr: XmlAttribute; argNum: Integer; ! replaceNode: XmlNode; begin customList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! // retrieve {0} type argument replacements. for attr in includeNode.Attributes do begin *************** *** 247,259 **** end; end; ! // retrieve <translate> tags ! for translateNode in XmlElement(includeNode).GetElementsByTagName('translate') do begin ! attr := translateNode.Attributes['source']; if not Assigned(attr) then ! raise Exception.Create('Missing ''source'' attribute in the ''translate'' tag'); ! customList.Add(attr.Value, translateNode.InnerText); end; ! Translate(XmlElement(importedNode), customList); end; --- 247,259 ---- end; end; ! // retrieve <replace> tags ! for replaceNode in XmlElement(includeNode).GetElementsByTagName('replace') do begin ! attr := replaceNode.Attributes['source']; if not Assigned(attr) then ! raise Exception.Create('Missing ''source'' attribute in the ''replace'' tag'); ! customList.Add(attr.Value, replaceNode.InnerText); end; ! Replace(XmlElement(importedNode), customList); end; *************** *** 318,330 **** end; ! class procedure XmlUtils.Translate(element: XmlElement); var list: SortedList; begin list := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! Translate(element, list); end; ! class procedure XmlUtils.Translate(element: XmlElement; translationList: IDictionary); var nodeInner: string; --- 318,330 ---- end; ! class procedure XmlUtils.Replace(element: XmlElement); var list: SortedList; begin list := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! Replace(element, list); end; ! class procedure XmlUtils.Replace(element: XmlElement; translationList: IDictionary); var nodeInner: string; *************** *** 341,348 **** end; ! class procedure XmlUtils.TranslateCommonMemberReferences(element: XmlElement); var memberElement: XmlElement; ! translateList: SortedList; id: string; qualifiedName: string; --- 341,348 ---- end; ! class procedure XmlUtils.ReplaceCommonMemberReferences(element: XmlElement); var memberElement: XmlElement; ! replaceList: SortedList; id: string; qualifiedName: string; *************** *** 355,366 **** if memberElement <> nil then begin ! translateList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); id := memberElement.Attributes['name'].Value; qualifiedName := StringUtils.After(StringUtils.BeforeLast(id, '('), ':'); className := StringUtils.BeforeLast(qualifiedName, '.'); memberName := StringUtils.AfterLast(qualifiedName, '.'); ! translateList.Add('<see_self>', System.String.Format('<see cref="{0}" />', id)); ! translateList.Add('<see_class>', System.String.Format('<see cref="T:{0}" />', className)); ! Translate(element, translateList); end; end; --- 355,366 ---- if memberElement <> nil then begin ! replaceList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); id := memberElement.Attributes['name'].Value; qualifiedName := StringUtils.After(StringUtils.BeforeLast(id, '('), ':'); className := StringUtils.BeforeLast(qualifiedName, '.'); memberName := StringUtils.AfterLast(qualifiedName, '.'); ! replaceList.Add('<see_self>', System.String.Format('<see cref="{0}" />', id)); ! replaceList.Add('<see_class>', System.String.Format('<see cref="T:{0}" />', className)); ! Replace(element, replaceList); end; end; |
From: Marcel B. <jed...@us...> - 2005-06-19 14:49:47
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10556/tools/JediDoc/source Modified Files: JediDoc.System.InfoClasses.pas JediDoc.System.Xml.AssemblyDocGeneration.pas JediDoc.System.Xml.Reflection.pas Log Message: * Fix: Events were not written to the XML unit doc * Added: custom tag processing: (parameterized) common text adding * Added: include tags can now have 'arg0' attributes, as well as <translate> elements Index: JediDoc.System.Xml.AssemblyDocGeneration.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.AssemblyDocGeneration.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.System.Xml.AssemblyDocGeneration.pas 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.System.Xml.AssemblyDocGeneration.pas 19 Jun 2005 14:49:38 -0000 1.2 *************** *** 185,188 **** --- 185,189 ---- Environment.CurrentDirectory := savedDir; end; + XmlUtils.CustomTagProcessing(Result); end; end; *************** *** 219,223 **** --- 220,231 ---- var childNode: XmlNode; + translationList: SortedList; begin + translationList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + translationList.Add('<see-ns />', System.String.Format('<see cref="N:{0}" />', member.NameSpace)); + translationList.Add('<see-class />', System.String.Format('<see cref="T:{0}.{1}" />', member.NameSpace, member.TypeName)); + translationList.Add('<see-self />', System.String.Format('<see cref="{0}" />', canonicalName)); + XmlUtils.Translate(XmlElement(memberNode), translationList); + FWriter.WriteStartElement('member'); FWriter.WriteAttributeString('name', canonicalName); Index: JediDoc.System.InfoClasses.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.InfoClasses.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.System.InfoClasses.pas 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.System.InfoClasses.pas 19 Jun 2005 14:49:38 -0000 1.2 *************** *** 68,83 **** {$REGION 'Protected methods'} strict protected ! function AddMember(typeId, name, assembly: string; loc: Location): MemberInfo; {$ENDREGION} {$REGION 'Public methods'} public ! function AddReflectionMember(typeId, name, assembly: string): MemberInfo; overload; ! function AddReflectionMember(typeId, name, assembly: string; isOptional: Boolean): MemberInfo; overload; ! function AddReflectionMember(typeId, name, assembly: string; isOptional: Boolean; params: StringArray): MemberInfo; overload; ! function AddReflectionMember(typeId, name, assembly: string; isOptional, hasRetVal: Boolean): MemberInfo; overload; ! function AddReflectionMember(typeId, name, assembly: string; isOptional, hasRetVal: Boolean; params: StringArray): MemberInfo; overload; ! function AddReflectionMember(typeId, name, assembly: string; params: StringArray): MemberInfo; overload; function AddXmlMember(memberId, xmlFile: string; params: array of string; hasExclude: Boolean): MemberInfo; function GetEnumerator: IEnumerator; overload; --- 68,84 ---- {$REGION 'Protected methods'} strict protected ! function AddMember(typeId, name, nameSpace, assembly: string; loc: Location): MemberInfo; {$ENDREGION} {$REGION 'Public methods'} public ! function AddReflectionMember(typeId, name, nameSpace, assembly: string): MemberInfo; overload; ! function AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional: Boolean): MemberInfo; overload; ! function AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional: Boolean; params: StringArray): MemberInfo; overload; ! function AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional, ! hasRetVal: Boolean): MemberInfo; overload; ! function AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional, hasRetVal: Boolean; params: StringArray): MemberInfo; overload; ! function AddReflectionMember(typeId, name, nameSpace, assembly: string; params: StringArray): MemberInfo; overload; function AddXmlMember(memberId, xmlFile: string; params: array of string; hasExclude: Boolean): MemberInfo; function GetEnumerator: IEnumerator; overload; *************** *** 93,97 **** {$REGION 'Constructor'} protected ! constructor Create(typeId, name, assembly: string); {$ENDREGION} {$REGION 'Data'} --- 94,98 ---- {$REGION 'Constructor'} protected ! constructor Create(typeId, name, nameSpace, assembly: string); {$ENDREGION} {$REGION 'Data'} *************** *** 102,107 **** --- 103,111 ---- FIsOptional: Boolean; FLocation: Location; + FMemberName: string; FName: string; + FNameSpace: string; FParamNames: ArrayList; + FTypeName: string; FUnitName: string; FXmlFile: string; *************** *** 136,142 **** --- 140,149 ---- property IsOptional: Boolean read FIsOptional; property Location: Location read FLocation; + property MemberName: string read FMemberName; property Name: string read FName; + property NameSpace: string read FNameSpace; property Count: Integer read get_Count; property Items[&index: Integer]: ParamInfo read get_Items; default; + property TypeName: string read FTypeName; property UnitName: string read get_UnitName; property XmlFile: string read FXmlFile; *************** *** 356,359 **** --- 363,367 ---- Conversions.MemberNameToDocType(thisEvent), Conversions.MemberNameToDocName(thisEvent), + thisEvent.DeclaringType.Namespace, assembly, IsEventOptional(thisEvent), *************** *** 369,372 **** --- 377,381 ---- Conversions.MemberNameToDocType(thisField), Conversions.MemberNameToDocName(thisField), + thisField.DeclaringType.Namespace, assembly, IsFieldOptional(thisField), *************** *** 388,391 **** --- 397,401 ---- Conversions.MemberNameToDocType(thisMethod), Conversions.MemberNameToDocName(thisMethod), + thisMethod.DeclaringType.Namespace, assembly, IsMethodOptional(thisMethod), *************** *** 402,405 **** --- 412,416 ---- Conversions.MemberNameToDocType(thisProperty), Conversions.MemberNameToDocName(thisProperty), + thisProperty.DeclaringType.Namespace, assembly, IsPropertyOptional(thisProperty), *************** *** 415,422 **** begin // Asserts the namespace item exists. ! di := docs.AddReflectionMember('N:', thisType.Namespace, assembly); di.SetUnitName('namespaceDoc.' + thisType.Namespace); // Asserts the type exists. ! di := docs.AddReflectionMember('T:', Conversions.TypeNameToDocName(thisType), assembly, IsTypeOptional(thisType)); di.SetUnitName(GetUnitFor(thisType)); for mi in thisType.GetMembers(BindingFlags.Static or BindingFlags.Instance or BindingFlags.Public or --- 426,434 ---- begin // Asserts the namespace item exists. ! di := docs.AddReflectionMember('N:', thisType.Namespace, '', assembly); di.SetUnitName('namespaceDoc.' + thisType.Namespace); // Asserts the type exists. ! di := docs.AddReflectionMember('T:', Conversions.TypeNameToDocName(thisType), thisType.Namespace, assembly, ! IsTypeOptional(thisType)); di.SetUnitName(GetUnitFor(thisType)); for mi in thisType.GetMembers(BindingFlags.Static or BindingFlags.Instance or BindingFlags.Public or *************** *** 444,448 **** if not Assigned(accessMethod) then accessMethod := thisEvent.GetRemoveMethod(True); ! Result := thisEvent.IsSpecialName and Assigned(accessMethod) and IsMethodDocumentable(accessMethod, True); end; --- 456,460 ---- if not Assigned(accessMethod) then accessMethod := thisEvent.GetRemoveMethod(True); ! Result := not thisEvent.IsSpecialName and Assigned(accessMethod) and IsMethodDocumentable(accessMethod, True); end; *************** *** 676,680 **** end; ! function DocOverview.AddMember(typeId, name, assembly: string; loc: Location): MemberInfo; var keyName: string; --- 688,692 ---- end; ! function DocOverview.AddMember(typeId, name, nameSpace, assembly: string; loc: Location): MemberInfo; var keyName: string; *************** *** 685,689 **** if idx < 0 then begin ! Result := MemberInfo.Create(typeId, name, assembly); FMembers.Add(keyName, Result); end --- 697,701 ---- if idx < 0 then begin ! Result := MemberInfo.Create(typeId, name, nameSpace, assembly); FMembers.Add(keyName, Result); end *************** *** 693,725 **** end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string): MemberInfo; begin ! Result := AddMember(typeId, name, assembly, Location.InAssembly); end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string; isOptional: Boolean): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, assembly); Result.SetIsOptional(isOptional); end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string; isOptional: Boolean; params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, assembly); Result.SetIsOptional(isOptional); Result.AddReflectionParameters(params); end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string; isOptional, hasRetVal: Boolean): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, assembly); Result.SetIsOptional(isOptional); end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string; isOptional, hasRetVal: Boolean; params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, assembly); Result.SetIsOptional(isOptional); Result.SetHasReturnValue(hasRetVal); --- 705,738 ---- end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string): MemberInfo; begin ! Result := AddMember(typeId, name, nameSpace, assembly, Location.InAssembly); end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional: Boolean): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, nameSpace, assembly); Result.SetIsOptional(isOptional); end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional: Boolean; params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, nameSpace, assembly); Result.SetIsOptional(isOptional); Result.AddReflectionParameters(params); end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional, ! hasRetVal: Boolean): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, nameSpace, assembly); Result.SetIsOptional(isOptional); end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string; isOptional, hasRetVal: Boolean; params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, nameSpace, assembly); Result.SetIsOptional(isOptional); Result.SetHasReturnValue(hasRetVal); *************** *** 727,733 **** end; ! function DocOverview.AddReflectionMember(typeId, name, assembly: string; params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, assembly); Result.AddReflectionParameters(params); end; --- 740,747 ---- end; ! function DocOverview.AddReflectionMember(typeId, name, nameSpace, assembly: string; ! params: array of string): MemberInfo; begin ! Result := AddReflectionMember(typeId, name, nameSpace, assembly); Result.AddReflectionParameters(params); end; *************** *** 735,739 **** function DocOverview.AddXmlMember(memberId, xmlFile: string; params: array of string; hasExclude: Boolean): MemberInfo; begin ! Result := AddMember(Conversions.XmlNameToDocType(memberId), Conversions.XmlNameToDocName(memberId), '', Location.InXml); Result.SetXmlFile(xmlFile, hasExclude); --- 749,753 ---- function DocOverview.AddXmlMember(memberId, xmlFile: string; params: array of string; hasExclude: Boolean): MemberInfo; begin ! Result := AddMember(Conversions.XmlNameToDocType(memberId), Conversions.XmlNameToDocName(memberId), '', '', Location.InXml); Result.SetXmlFile(xmlFile, hasExclude); *************** *** 840,850 **** {$REGION 'MemberInfo'} ! constructor MemberInfo.Create(typeId, name, assembly: string); begin inherited Create; FAssembly := assembly; FName := name + ':' + typeId.SubString(0, 1).ToUpper; FLocation := JediDoc.System.InfoClasses.Location.None; FParamNames := ArrayList.Create; end; --- 854,885 ---- {$REGION 'MemberInfo'} ! constructor MemberInfo.Create(typeId, name, nameSpace, assembly: string); ! var ! beforeParams: string; begin inherited Create; FAssembly := assembly; FName := name + ':' + typeId.SubString(0, 1).ToUpper; + FNameSpace := nameSpace; FLocation := JediDoc.System.InfoClasses.Location.None; FParamNames := ArrayList.Create; + case typeId.ToLower.Chars[0] of + 't': + begin + FTypeName := name.Substring(nameSpace.Length + 1); + FMemberName := ''; + end; + 'n': + begin + FTypeName := ''; + FMemberName := ''; + end; + else + begin + beforeParams := StringUtils.BeforeLast(name.Substring(nameSpace.Length + 1), '('); + FTypeName := StringUtils.BeforeLast(beforeParams, '.'); + FMemberName := StringUtils.AfterLast(beforeParams, '.'); + end; + end; end; Index: JediDoc.System.Xml.Reflection.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Xml.Reflection.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.System.Xml.Reflection.pas 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.System.Xml.Reflection.pas 19 Jun 2005 14:49:38 -0000 1.2 *************** *** 28,35 **** {$REGION 'uses'} uses System.Collections, System.IO, ! System.Xml, ! JediDoc.System.InfoClasses; {$ENDREGION} --- 28,37 ---- {$REGION 'uses'} uses + Jedi.System.Strings, + JediDoc.System.InfoClasses, System.Collections, + System.Collections.Specialized, System.IO, ! System.Xml; {$ENDREGION} *************** *** 51,63 **** {$ENDREGION} ! {$REGION 'Utilities (include processing)'} XmlUtils = class {$REGION 'Private static methods'} strict private class function GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; static; {$ENDREGION} {$REGION 'Static methods'} public class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; {$ENDREGION} end; --- 53,75 ---- {$ENDREGION} ! {$REGION 'Utilities (include processing, translating, custom tag processing)'} XmlUtils = class {$REGION 'Private static methods'} strict private class function GetIncludedNodes(filename, xpath: string; fileList: HashTable): XmlNodeList; static; + class procedure ProcessIncludeTranslations(importedNode, includeNode: XmlNode); static; + {$ENDREGION} + {$REGION 'Custom tag processing methods'} + strict private + class procedure ProcessRef(doc: XmlDocument); static; + class procedure ProcessTrueIf(doc: XmlDocument); static; {$ENDREGION} {$REGION 'Static methods'} public + class procedure CustomTagProcessing(doc: XmlDocument); static; class procedure ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); static; + class procedure Translate(element: XmlElement); overload; static; + class procedure Translate(element: XmlElement; translationList: IDictionary); overload; static; + class procedure TranslateCommonMemberReferences(element: XmlElement); static; {$ENDREGION} end; *************** *** 160,163 **** --- 172,181 ---- {$REGION 'XmlUtils'} + class procedure XmlUtils.CustomTagProcessing(doc: XmlDocument); + begin + ProcessRef(doc); + ProcessTrueIf(doc); + end; + class procedure XmlUtils.ExpandIncludeNodes(doc: XmlDocument; fileList: HashTable); var *************** *** 187,190 **** --- 205,209 ---- importedNode := doc.ImportNode(includedNode, True); includeNode.ParentNode.InsertBefore(importedNode, includeNode); + ProcessIncludeTranslations(importedNode, includeNode); end; removeList.Add(includeNode); *************** *** 210,213 **** --- 229,368 ---- end; end; + + class procedure XmlUtils.ProcessIncludeTranslations(importedNode, includeNode: XmlNode); + var + customList: SortedList; + attr: XmlAttribute; + argNum: Integer; + translateNode: XmlNode; + begin + customList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + // retrieve {0} type argument translations. + for attr in includeNode.Attributes do + begin + if attr.Name.ToLower.StartsWith('arg') then + begin + argNum := Int32.Parse(attr.Name.Substring(3)); + customList.Add(System.String.Format('{{{0}}}', argNum), attr.Value); + end; + end; + // retrieve <translate> tags + for translateNode in XmlElement(includeNode).GetElementsByTagName('translate') do + begin + attr := translateNode.Attributes['source']; + if not Assigned(attr) then + raise Exception.Create('Missing ''source'' attribute in the ''translate'' tag'); + customList.Add(attr.Value, translateNode.InnerText); + end; + Translate(XmlElement(importedNode), customList); + end; + + class procedure XmlUtils.ProcessRef(doc: XmlDocument); + var + removeList: ArrayList; + refNode: XmlNode; + attr: XmlAttribute; + typeName: string; + memberName: string; + memberType: string; + frag: XmlDocumentFragment; + obj: &Object; + begin + removeList := ArrayList.Create; + for refNode in doc.GetElementsByTagName('ref') do + begin + attr := refNode.Attributes['type']; + if attr = nil then + raise Exception.Create('Missing ''type'' attribute in ''ref'' tag'); + typeName := attr.Value; + + attr := refNode.Attributes['member']; + if attr = nil then + raise Exception.Create('Missing ''member'' attribute in ''ref'' tag'); + memberName := attr.Value; + + attr := refNode.Attributes['memberType']; + if attr = nil then + memberType := 'M' + else + memberType := attr.Value.Chars[0]; + + frag := doc.CreateDocumentFragment; + frag.InnerXml := System.String.Format('<see cref="T:{0}" />.<see cref="{2}:{0}.{1}" />', + typeName, memberName, memberType.ToUpper); + refNode.ParentNode.InsertBefore(frag, refNode); + removeList.Add(refNode); + end; + for obj in removeList do + XmlNode(obj).ParentNode.RemoveChild(XmlNode(obj)); + end; + + class procedure XmlUtils.ProcessTrueIf(doc: XmlDocument); + var + removeList: ArrayList; + trueIfNode: XmlNode; + frag: XmlDocumentFragment; + obj: &Object; + begin + removeList := ArrayList.Create; + for trueIfNode in doc.GetElementsByTagName('true-if') do + begin + frag := doc.CreateDocumentFragment; + frag.InnerXml := System.String.Format('<see langword="true" /> if {0}; <see langword="false" /> otherwise.', + trueIfNode.InnerText); + trueIfNode.ParentNode.InsertBefore(frag, trueIfNode); + removeList.Add(trueIfNode); + end; + for obj in removeList do + XmlNode(obj).ParentNode.RemoveChild(XmlNode(obj)); + end; + + class procedure XmlUtils.Translate(element: XmlElement); + var + list: SortedList; + begin + list := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + Translate(element, list); + end; + + class procedure XmlUtils.Translate(element: XmlElement; translationList: IDictionary); + var + nodeInner: string; + entry: DictionaryEntry; + begin + if element = nil then + raise ArgumentNullException.Create('element'); + if translationList = nil then + raise ArgumentNullException.Create('translationList'); + nodeInner := element.InnerXml; + for entry in translationList do + nodeInner := nodeInner.Replace(string(entry.Key), string(entry.Value)); + element.InnerXml := nodeInner; + end; + + class procedure XmlUtils.TranslateCommonMemberReferences(element: XmlElement); + var + memberElement: XmlElement; + translateList: SortedList; + id: string; + qualifiedName: string; + className: string; + memberName: string; + begin + memberElement := element; + while (memberElement <> nil) and (memberElement.Name <> 'member') do + memberElement := XmlElement(memberElement.ParentNode); + if memberElement <> nil then + begin + translateList := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + id := memberElement.Attributes['name'].Value; + qualifiedName := StringUtils.After(StringUtils.BeforeLast(id, '('), ':'); + className := StringUtils.BeforeLast(qualifiedName, '.'); + memberName := StringUtils.AfterLast(qualifiedName, '.'); + translateList.Add('<see_self>', System.String.Format('<see cref="{0}" />', id)); + translateList.Add('<see_class>', System.String.Format('<see cref="T:{0}" />', className)); + Translate(element, translateList); + end; + end; {$ENDREGION} |
From: Marcel B. <jed...@us...> - 2005-06-19 14:49:46
|
Update of /cvsroot/jedidotnet/tools/JediDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10556/tools/JediDoc Modified Files: JediDoc.Console.bdsproj JediDoc.Xml.bdsproj JediDoc.Xml.dpk Log Message: * Fix: Events were not written to the XML unit doc * Added: custom tag processing: (parameterized) common text adding * Added: include tags can now have 'arg0' attributes, as well as <translate> elements Index: JediDoc.Console.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Console.bdsproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JediDoc.Console.bdsproj 30 Mar 2005 14:07:25 -0000 1.2 --- JediDoc.Console.bdsproj 19 Jun 2005 14:49:37 -0000 1.3 *************** *** 157,403 **** <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> </VersionInfoKeys> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <FileList> <File FileName="..\bin\JediDoc.Analysis.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Analysis" AssemblyName="JediDoc.Analysis" Version="1.0.1.0" LinkUnits="False"/> --- 157,160 ---- Index: JediDoc.Xml.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Xml.bdsproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JediDoc.Xml.bdsproj 30 Mar 2005 14:07:27 -0000 1.2 --- JediDoc.Xml.bdsproj 19 Jun 2005 14:49:38 -0000 1.3 *************** *** 121,128 **** <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\bin;..\..\main\bin</Directories> ! <Directories Name="Packages">JediDoc.Core;System.XML.dll;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> ! <Directories Name="UsePackages">False</Directories> </Directories> <Parameters> --- 121,128 ---- <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\bin;..\..\main\bin</Directories> ! <Directories Name="Packages">Jedi.IO;JediDoc.Core;System.XML.dll;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> ! <Directories Name="UsePackages">True</Directories> </Directories> <Parameters> *************** *** 158,165 **** </VersionInfoKeys> <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" CopyLocal="True" Version="1.0.1.0" LinkUnits="False"/> <File FileName="..\..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="source\JediDoc.System.Xml.Reflection.pas" ContainerId="" ModuleName="JediDoc.System.Xml.Reflection"/> <File FileName="source\JediDoc.System.Xml.UnitDocGeneration.pas" ContainerId="" ModuleName="JediDoc.System.Xml.UnitDocGeneration"/> --- 158,166 ---- </VersionInfoKeys> <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1882.30496" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" CopyLocal="True" Version="1.0.1.0" LinkUnits="False"/> <File FileName="..\..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> + <File FileName="..\..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> <File FileName="source\JediDoc.System.Xml.Reflection.pas" ContainerId="" ModuleName="JediDoc.System.Xml.Reflection"/> <File FileName="source\JediDoc.System.Xml.UnitDocGeneration.pas" ContainerId="" ModuleName="JediDoc.System.Xml.UnitDocGeneration"/> Index: JediDoc.Xml.dpk =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Xml.dpk,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JediDoc.Xml.dpk 30 Mar 2005 14:07:27 -0000 1.2 --- JediDoc.Xml.dpk 19 Jun 2005 14:49:38 -0000 1.3 *************** *** 29,33 **** System.XML, JediDoc.Core, ! Jedi.IO; contains --- 29,34 ---- System.XML, JediDoc.Core, ! Jedi.IO, ! Jedi.System; contains |
From: Marcel B. <jed...@us...> - 2005-06-16 13:40:26
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15087/main/run Modified Files: Jedi.System.CommandLine.pas Log Message: For some reason, the CommandLineArgument attribute was marked to be usable only once on a target. Bad! Index: Jedi.System.CommandLine.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.CommandLine.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.System.CommandLine.pas 16 Jun 2005 13:18:02 -0000 1.5 --- Jedi.System.CommandLine.pas 16 Jun 2005 13:40:17 -0000 1.6 *************** *** 240,244 **** '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = False, &Inherited = False)] CommandLineArgumentAttribute = class (Attribute) {$REGION 'Data'} --- 240,244 ---- '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = True, &Inherited = False)] CommandLineArgumentAttribute = class (Attribute) {$REGION 'Data'} *************** *** 294,298 **** '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = False, &Inherited = False)] BooleanCommandLineArgumentAttribute = class (CommandLineArgumentAttribute) {$REGION 'Constructor'} --- 294,298 ---- '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = True, &Inherited = False)] BooleanCommandLineArgumentAttribute = class (CommandLineArgumentAttribute) {$REGION 'Constructor'} |
From: Marcel B. <jed...@us...> - 2005-06-16 13:24:18
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3705/nunit Modified Files: Nunit.Jedi.Results.xml Log Message: Prove that all 150 test cases succeed Index: Nunit.Jedi.Results.xml =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.Results.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Nunit.Jedi.Results.xml 28 Mar 2005 18:14:03 -0000 1.4 --- Nunit.Jedi.Results.xml 16 Jun 2005 13:24:08 -0000 1.5 *************** *** 1,6 **** <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This file represents the results of running a test suite--> ! <test-results name="F:\Programming\JEDI\JediDotNet\nunit\Nunit.Jedi.nunit" total="121" failures="0" not-run="0" date="28-3-2005" time="20:05"> ! <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\Nunit.Jedi.nunit" success="True" time="4.4375" asserts="0"> <results> <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\bin\Nunit.Jedi.IO.dll" success="True" time="1.390625" asserts="0"> --- 1,6 ---- <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This file represents the results of running a test suite--> ! <test-results name="F:\Programming\JEDI\JediDotNet\nunit\Nunit.Jedi.nunit" total="150" failures="0" not-run="0" date="16-6-2005" time="15:07"> ! <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\Nunit.Jedi.nunit" success="True" time="5" asserts="0"> <results> <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\bin\Nunit.Jedi.IO.dll" success="True" time="1.390625" asserts="0"> *************** *** 10,45 **** <test-suite name="IO" success="True" time="1.375" asserts="0"> <results> ! <test-suite name="IniFiles" success="True" time="0.8125" asserts="0"> <results> ! <test-suite name="BufferedFile" success="True" time="0.703125" asserts="0"> <results> ! <test-case name="Jedi.IO.IniFiles.BufferedFile.AutoFlush" executed="True" success="True" time="0.391" asserts="4" /> ! <test-case name="Jedi.IO.IniFiles.BufferedFile.AutoReload" executed="True" success="True" time="0.234" asserts="6" /> <test-case name="Jedi.IO.IniFiles.BufferedFile.LoadSaveLoad" executed="True" success="True" time="0.000" asserts="9" /> </results> </test-suite> ! <test-suite name="MemoryBased" success="True" time="0.078125" asserts="0"> <results> ! <test-case name="Jedi.IO.IniFiles.MemoryBased.KeyCollection" executed="True" success="True" time="0.016" asserts="13" /> <test-case name="Jedi.IO.IniFiles.MemoryBased.Loading" executed="True" success="True" time="0.000" asserts="3" /> <test-case name="Jedi.IO.IniFiles.MemoryBased.SectionCollection" executed="True" success="True" time="0.000" asserts="5" /> ! <test-case name="Jedi.IO.IniFiles.MemoryBased.SectionKeyCollection" executed="True" success="True" time="0.016" asserts="24" /> </results> </test-suite> </results> </test-suite> ! <test-suite name="Paths" success="True" time="0.5625" asserts="0"> <results> ! <test-suite name="Manipulations" success="True" time="0.140625" asserts="0"> <results> <test-case name="Jedi.IO.Paths.Manipulations.CombineTenPaths" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CombineTwo" executed="True" success="True" time="0.016" asserts="3" /> <test-case name="Jedi.IO.Paths.Manipulations.CombineTwoAbsolutePaths" executed="True" success="True" time="0.000" asserts="3" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CommonBaseOfFour" executed="True" success="True" time="0.016" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CommonBaseOfTwo" executed="True" success="True" time="0.000" asserts="3" /> ! <test-case name="Jedi.IO.Paths.Manipulations.MakeRelativeFrom" executed="True" success="True" time="0.000" asserts="4" /> </results> </test-suite> ! <test-suite name="Normalize" success="True" time="0.1875" asserts="0"> <results> <test-case name="Jedi.IO.Paths.Normalize.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> --- 10,49 ---- <test-suite name="IO" success="True" time="1.375" asserts="0"> <results> ! <test-suite name="IniFiles" success="True" time="0.6875" asserts="0"> <results> ! <test-suite name="BufferedFile" success="True" time="0.625" asserts="0"> <results> ! <test-case name="Jedi.IO.IniFiles.BufferedFile.AutoFlush" executed="True" success="True" time="0.344" asserts="4" /> ! <test-case name="Jedi.IO.IniFiles.BufferedFile.AutoReload" executed="True" success="True" time="0.219" asserts="6" /> <test-case name="Jedi.IO.IniFiles.BufferedFile.LoadSaveLoad" executed="True" success="True" time="0.000" asserts="9" /> </results> </test-suite> ! <test-suite name="MemoryBased" success="True" time="0.0625" asserts="0"> <results> ! <test-case name="Jedi.IO.IniFiles.MemoryBased.KeyCollection" executed="True" success="True" time="0.000" asserts="13" /> <test-case name="Jedi.IO.IniFiles.MemoryBased.Loading" executed="True" success="True" time="0.000" asserts="3" /> <test-case name="Jedi.IO.IniFiles.MemoryBased.SectionCollection" executed="True" success="True" time="0.000" asserts="5" /> ! <test-case name="Jedi.IO.IniFiles.MemoryBased.SectionKeyCollection" executed="True" success="True" time="0.000" asserts="24" /> </results> </test-suite> </results> </test-suite> ! <test-suite name="Paths" success="True" time="0.671875" asserts="0"> <results> ! <test-suite name="Manipulations" success="True" time="0.171875" asserts="0"> <results> <test-case name="Jedi.IO.Paths.Manipulations.CombineTenPaths" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CombineTwo" executed="True" success="True" time="0.000" asserts="3" /> <test-case name="Jedi.IO.Paths.Manipulations.CombineTwoAbsolutePaths" executed="True" success="True" time="0.000" asserts="3" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CommonBaseOfFive" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CommonBaseOfFour" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.CommonBaseOfTwo" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="Jedi.IO.Paths.Manipulations.MakeRelativeFromNoCommonBase" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.MakeRelativeFromOneLevelUp" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Manipulations.MakeRelativeFromSameLevel" executed="True" success="True" time="0.000" asserts="2" /> ! <test-case name="Jedi.IO.Paths.Manipulations.MakeRelativeFromTwoLevelsUp" executed="True" success="True" time="0.000" asserts="1" /> </results> </test-suite> ! <test-suite name="Normalize" success="True" time="0.234375" asserts="0"> <results> <test-case name="Jedi.IO.Paths.Normalize.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> *************** *** 48,52 **** <test-case name="Jedi.IO.Paths.Normalize.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Normalize.RelativePath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.RelativePathUpTwoLevels" executed="True" success="True" time="0.000" asserts="1" /> --- 52,56 ---- <test-case name="Jedi.IO.Paths.Normalize.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Jedi.IO.Paths.Normalize.RelativePath" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Jedi.IO.Paths.Normalize.RelativePathUpTwoLevels" executed="True" success="True" time="0.000" asserts="1" /> *************** *** 62,66 **** </results> </test-suite> ! <test-suite name="ValidityChecks" success="True" time="0.1875" asserts="0"> <results> <test-case name="Jedi.IO.Paths.ValidityChecks.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> --- 66,70 ---- </results> </test-suite> ! <test-suite name="ValidityChecks" success="True" time="0.203125" asserts="0"> <results> <test-case name="Jedi.IO.Paths.ValidityChecks.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> *************** *** 86,126 **** </results> </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\bin\Nunit.Jedi.Storage.dll" success="True" time="0.140625" asserts="0"> ! <results> ! <test-suite name="Jedi" success="True" time="0.140625" asserts="0"> ! <results> ! <test-suite name="IO" success="True" time="0.125" asserts="0"> ! <results> ! <test-suite name="DataStorage" success="True" time="0.125" asserts="0"> ! <results> ! <test-suite name="RootStorage" success="True" time="0.109375" asserts="0"> ! <results> ! <test-case name="Jedi.IO.DataStorage.RootStorage.AddOneStorage" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="Jedi.IO.DataStorage.RootStorage.AddOneStorageAndClear" executed="True" success="True" time="0.000" asserts="6" /> ! <test-case name="Jedi.IO.DataStorage.RootStorage.AddTwoStoragesAndRemoveFirst" executed="True" success="True" time="0.000" asserts="9" /> ! <test-case name="Jedi.IO.DataStorage.RootStorage.CheckStorageForWithTwoStorages" executed="True" success="True" time="0.000" asserts="6" /> ! <test-case name="Jedi.IO.DataStorage.RootStorage.EmptyStorage" executed="True" success="True" time="0.000" asserts="3" /> ! </results> ! </test-suite> ! <test-suite name="Utilities" success="True" time="0.015625" asserts="0"> ! <results> ! <test-case name="Jedi.IO.DataStorage.Utilities.PathNormalization" executed="True" success="True" time="0.000" asserts="0" /> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\bin\Nunit.Jedi.System.dll" success="True" time="2.875" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="2.875" asserts="0"> <results> ! <test-suite name="System" success="True" time="1.375" asserts="0"> <results> ! <test-suite name="Attributes" success="True" time="0.09375" asserts="0"> <results> <test-suite name="Combining" success="True" time="0.0625" asserts="0"> --- 90,100 ---- </results> </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\nunit\bin\Nunit.Jedi.System.dll" success="True" time="3.578125" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="3.5625" asserts="0"> <results> ! <test-suite name="System" success="True" time="1.640625" asserts="0"> <results> ! <test-suite name="Attributes" success="True" time="0.109375" asserts="0"> <results> <test-suite name="Combining" success="True" time="0.0625" asserts="0"> *************** *** 140,145 **** </results> </test-suite> ! <test-suite name="CommandLine" success="True" time="0.34375" asserts="0"> <results> <test-suite name="Errors" success="True" time="0.046875" asserts="0"> <results> --- 114,136 ---- </results> </test-suite> ! <test-suite name="CommandLine" success="True" time="0.53125" asserts="0"> <results> + <test-suite name="BooleanCases" success="True" time="0.09375" asserts="0"> + <results> + <test-case name="Jedi.System.CommandLine.BooleanCases.NoValueIgnores" executed="True" success="True" time="0.000" asserts="4" /> + <test-case name="Jedi.System.CommandLine.BooleanCases.NoValueResets" executed="True" success="True" time="0.000" asserts="4" /> + <test-case name="Jedi.System.CommandLine.BooleanCases.NoValueSets" executed="True" success="True" time="0.016" asserts="4" /> + <test-case name="Jedi.System.CommandLine.BooleanCases.NoValueThrowsException" executed="True" success="True" time="0.016" asserts="0" /> + <test-case name="Jedi.System.CommandLine.BooleanCases.NoValueToggles" executed="True" success="True" time="0.000" asserts="4" /> + </results> + </test-suite> + <test-suite name="EnumCases" success="True" time="0.078125" asserts="0"> + <results> + <test-case name="Jedi.System.CommandLine.EnumCases.Value0" executed="True" success="True" time="0.000" asserts="2" /> + <test-case name="Jedi.System.CommandLine.EnumCases.Value1" executed="True" success="True" time="0.000" asserts="2" /> + <test-case name="Jedi.System.CommandLine.EnumCases.Value2" executed="True" success="True" time="0.000" asserts="2" /> + <test-case name="Jedi.System.CommandLine.EnumCases.Value3" executed="True" success="True" time="0.000" asserts="2" /> + </results> + </test-suite> <test-suite name="Errors" success="True" time="0.046875" asserts="0"> <results> *************** *** 149,160 **** </results> </test-suite> ! <test-suite name="SpecialCases" success="True" time="0.078125" asserts="0"> <results> ! <test-case name="Jedi.System.CommandLine.SpecialCases.CaseSensitive" executed="True" success="True" time="0.031" asserts="2" /> <test-case name="Jedi.System.CommandLine.SpecialCases.CustomProcessing" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.CommandLine.SpecialCases.MixedNormalAndCustom" executed="True" success="True" time="0.000" asserts="2" /> </results> </test-suite> ! <test-suite name="ToInstance" success="True" time="0.125" asserts="0"> <results> <test-case name="Jedi.System.CommandLine.ToInstance.OptionNotSpecified" executed="True" success="True" time="0.000" asserts="6" /> --- 140,151 ---- </results> </test-suite> ! <test-suite name="SpecialCases" success="True" time="0.046875" asserts="0"> <results> ! <test-case name="Jedi.System.CommandLine.SpecialCases.CaseSensitive" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.CommandLine.SpecialCases.CustomProcessing" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.CommandLine.SpecialCases.MixedNormalAndCustom" executed="True" success="True" time="0.000" asserts="2" /> </results> </test-suite> ! <test-suite name="ToInstance" success="True" time="0.109375" asserts="0"> <results> <test-case name="Jedi.System.CommandLine.ToInstance.OptionNotSpecified" executed="True" success="True" time="0.000" asserts="6" /> *************** *** 165,169 **** </results> </test-suite> ! <test-suite name="ToMultipleClasses" success="True" time="0.09375" asserts="0"> <results> <test-case name="Jedi.System.CommandLine.ToMultipleClasses.OptionNotSpecified" executed="True" success="True" time="0.000" asserts="6" /> --- 156,160 ---- </results> </test-suite> ! <test-suite name="ToMultipleClasses" success="True" time="0.140625" asserts="0"> <results> <test-case name="Jedi.System.CommandLine.ToMultipleClasses.OptionNotSpecified" executed="True" success="True" time="0.000" asserts="6" /> *************** *** 176,203 **** </results> </test-suite> ! <test-suite name="SourceVersioning" success="True" time="0.1875" asserts="0"> <results> <test-suite name="Attributes" success="True" time="0.0625" asserts="0"> <results> <test-case name="Jedi.System.SourceVersioning.Attributes.BaseAttribute" executed="True" success="True" time="0.000" asserts="6" /> ! <test-case name="Jedi.System.SourceVersioning.Attributes.CVSBasedAttribute" executed="True" success="True" time="0.016" asserts="16" /> ! <test-case name="Jedi.System.SourceVersioning.Attributes.JediBasedAttribute" executed="True" success="True" time="0.016" asserts="6" /> </results> </test-suite> ! <test-suite name="RevisionStruct" success="True" time="0.0625" asserts="0"> <results> <test-case name="Jedi.System.SourceVersioning.RevisionStruct.Comparisons" executed="True" success="True" time="0.000" asserts="31" /> ! <test-case name="Jedi.System.SourceVersioning.RevisionStruct.Conversions" executed="True" success="True" time="0.031" asserts="18" /> </results> </test-suite> <test-suite name="SourceInfoClass" success="True" time="0.03125" asserts="0"> <results> ! <test-case name="Jedi.System.SourceVersioning.SourceInfoClass.AtLeast" executed="True" success="True" time="0.016" asserts="4" /> ! <test-case name="Jedi.System.SourceVersioning.SourceInfoClass.Retrieval" executed="True" success="True" time="0.016" asserts="8" /> </results> </test-suite> </results> </test-suite> ! <test-suite name="Strings" success="True" time="0.71875" asserts="0"> <results> <test-suite name="EscapedStrings" success="True" time="0.03125" asserts="0"> --- 167,194 ---- </results> </test-suite> ! <test-suite name="SourceVersioning" success="True" time="0.15625" asserts="0"> <results> <test-suite name="Attributes" success="True" time="0.0625" asserts="0"> <results> <test-case name="Jedi.System.SourceVersioning.Attributes.BaseAttribute" executed="True" success="True" time="0.000" asserts="6" /> ! <test-case name="Jedi.System.SourceVersioning.Attributes.CVSBasedAttribute" executed="True" success="True" time="0.000" asserts="16" /> ! <test-case name="Jedi.System.SourceVersioning.Attributes.JediBasedAttribute" executed="True" success="True" time="0.000" asserts="6" /> </results> </test-suite> ! <test-suite name="RevisionStruct" success="True" time="0.03125" asserts="0"> <results> <test-case name="Jedi.System.SourceVersioning.RevisionStruct.Comparisons" executed="True" success="True" time="0.000" asserts="31" /> ! <test-case name="Jedi.System.SourceVersioning.RevisionStruct.Conversions" executed="True" success="True" time="0.000" asserts="18" /> </results> </test-suite> <test-suite name="SourceInfoClass" success="True" time="0.03125" asserts="0"> <results> ! <test-case name="Jedi.System.SourceVersioning.SourceInfoClass.AtLeast" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="Jedi.System.SourceVersioning.SourceInfoClass.Retrieval" executed="True" success="True" time="0.000" asserts="8" /> </results> </test-suite> </results> </test-suite> ! <test-suite name="Strings" success="True" time="0.84375" asserts="0"> <results> <test-suite name="EscapedStrings" success="True" time="0.03125" asserts="0"> *************** *** 214,218 **** </results> </test-suite> ! <test-suite name="NumericConversions" success="True" time="0.09375" asserts="0"> <results> <test-case name="Jedi.System.Strings.NumericConversions.BinToInt" executed="True" success="True" time="0.000" asserts="18" /> --- 205,209 ---- </results> </test-suite> ! <test-suite name="NumericConversions" success="True" time="0.109375" asserts="0"> <results> <test-case name="Jedi.System.Strings.NumericConversions.BinToInt" executed="True" success="True" time="0.000" asserts="18" /> *************** *** 224,230 **** </results> </test-suite> ! <test-suite name="QuotedStrings" success="True" time="0.265625" asserts="0"> <results> ! <test-case name="Jedi.System.Strings.QuotedStrings.DequoteNonQuotedString" executed="True" success="True" time="0.016" asserts="2" /> <test-case name="Jedi.System.Strings.QuotedStrings.DequoteStringAllowedMissingEndQuote" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.Strings.QuotedStrings.DequoteStringCheckEndQuote" executed="True" success="True" time="0.000" asserts="2" /> --- 215,221 ---- </results> </test-suite> ! <test-suite name="QuotedStrings" success="True" time="0.296875" asserts="0"> <results> ! <test-case name="Jedi.System.Strings.QuotedStrings.DequoteNonQuotedString" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.Strings.QuotedStrings.DequoteStringAllowedMissingEndQuote" executed="True" success="True" time="0.000" asserts="2" /> <test-case name="Jedi.System.Strings.QuotedStrings.DequoteStringCheckEndQuote" executed="True" success="True" time="0.000" asserts="2" /> *************** *** 245,249 **** </results> </test-suite> ! <test-suite name="Substrings" success="True" time="0.171875" asserts="0"> <results> <test-case name="Jedi.System.Strings.Substrings.AfterLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> --- 236,240 ---- </results> </test-suite> ! <test-suite name="Substrings" success="True" time="0.1875" asserts="0"> <results> <test-case name="Jedi.System.Strings.Substrings.AfterLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> *************** *** 260,264 **** </results> </test-suite> ! <test-suite name="TabSet" success="True" time="0.109375" asserts="0"> <results> <test-case name="Jedi.System.Strings.TabSet.AddingTabs" executed="True" success="True" time="0.000" asserts="53" /> --- 251,255 ---- </results> </test-suite> ! <test-suite name="TabSet" success="True" time="0.125" asserts="0"> <results> <test-case name="Jedi.System.Strings.TabSet.AddingTabs" executed="True" success="True" time="0.000" asserts="53" /> *************** *** 275,286 **** </results> </test-suite> ! <test-suite name="Timers" success="True" time="1.484375" asserts="0"> <results> ! <test-suite name="EventScheduler" success="True" time="1.46875" asserts="0"> <results> ! <test-case name="Jedi.Timers.EventScheduler.SingleScheduleEveryPointTwoSeconds" executed="True" success="True" time="0.844" asserts="5" /> <test-case name="Jedi.Timers.EventScheduler.SingleScheduleEveryPointTwoSecondsNoSleep" executed="True" success="True" time="0.625" asserts="5" /> </results> </test-suite> </results> </test-suite> --- 266,319 ---- </results> </test-suite> ! <test-suite name="Timers" success="True" time="1.890625" asserts="0"> <results> ! <test-suite name="EventScheduler" success="True" time="1.484375" asserts="0"> <results> ! <test-case name="Jedi.Timers.EventScheduler.SingleScheduleEveryPointTwoSeconds" executed="True" success="True" time="0.828" asserts="5" /> <test-case name="Jedi.Timers.EventScheduler.SingleScheduleEveryPointTwoSecondsNoSleep" executed="True" success="True" time="0.625" asserts="5" /> </results> </test-suite> + <test-suite name="Schedules" success="True" time="0.40625" asserts="0"> + <results> + <test-suite name="DaySchedule" success="True" time="0.046875" asserts="0"> + <results> + <test-case name="Jedi.Timers.Schedules.DaySchedule.Enumerate_Every3DaysFromJanOf0002ToDecOf0002" executed="True" success="True" time="0.000" asserts="245" /> + <test-case name="Jedi.Timers.Schedules.DaySchedule.Enumerate_EveryDayFromJanOf0002ToDecOf0002" executed="True" success="True" time="0.000" asserts="731" /> + <test-case name="Jedi.Timers.Schedules.DaySchedule.Enumerate_EveryDayInEvery9MonthsOfEveryYearFrom2005To2010" executed="True" success="True" time="0.000" asserts="745" /> + </results> + </test-suite> + <test-suite name="Generic" success="True" time="0.078125" asserts="0"> + <results> + <test-case name="Jedi.Timers.Schedules.Generic.EnumerateNested" executed="True" success="True" time="0.000" asserts="169" /> + <test-case name="Jedi.Timers.Schedules.Generic.EnumerateNestedNonRecursive" executed="True" success="True" time="0.000" asserts="25" /> + <test-case name="Jedi.Timers.Schedules.Generic.EnumerateSimple" executed="True" success="True" time="0.000" asserts="25" /> + <test-case name="Jedi.Timers.Schedules.Generic.EnumerateTwoNested" executed="True" success="True" time="0.000" asserts="179" /> + <test-case name="Jedi.Timers.Schedules.Generic.EnumeratorWrapped" executed="True" success="True" time="0.000" asserts="113" /> + </results> + </test-suite> + <test-suite name="MonthSchedule" success="True" time="0.203125" asserts="0"> + <results> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.DecOf0002ToMonthNumber" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.DecOf9999ToMonthNumber" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Enumerate_Every3MonthsFromFebToSepInEvery4YearsFrom2005To2050" executed="True" success="True" time="0.000" asserts="73" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Enumerate_EveryMonthFromJanOf0002ToDecOf0004" executed="True" success="True" time="0.000" asserts="73" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Enumerate_EveryMonthFromJanToDecInEvery2YearsFrom2005To2010" executed="True" success="True" time="0.000" asserts="73" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Enumerate_EveryThreeMonthsFromJanOf0002ToDecOf0004" executed="True" success="True" time="0.016" asserts="25" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.JanOf0001ToMonthNumber" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.JanOf0002ToMonthNumber" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Month000000ToDateTime" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Month000011ToDateTime" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Month000012ToDateTime" executed="True" success="True" time="0.000" asserts="1" /> + <test-case name="Jedi.Timers.Schedules.MonthSchedule.Month119987ToDateTime" executed="True" success="True" time="0.000" asserts="1" /> + </results> + </test-suite> + <test-suite name="YearSchedule" success="True" time="0.03125" asserts="0"> + <results> + <test-case name="Jedi.Timers.Schedules.YearSchedule.Enumerate_2004To2008" executed="True" success="True" time="0.000" asserts="11" /> + <test-case name="Jedi.Timers.Schedules.YearSchedule.Enumerate_EveryFiveYearsFrom2000To3000" executed="True" success="True" time="0.000" asserts="403" /> + </results> + </test-suite> + </results> + </test-suite> </results> </test-suite> |
From: Marcel B. <jed...@us...> - 2005-06-16 13:23:10
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3033/nunit Modified Files: Nunit.Jedi.System.bdsproj Nunit.Jedi.System.dpk Log Message: Added scheduling framework test sets Index: Nunit.Jedi.System.dpk =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.System.dpk,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Nunit.Jedi.System.dpk 1 Mar 2005 14:26:41 -0000 1.8 --- Nunit.Jedi.System.dpk 16 Jun 2005 13:23:01 -0000 1.9 *************** *** 31,35 **** Jedi.System, System.Data, ! System.XML; contains --- 31,36 ---- Jedi.System, System.Data, ! System.XML, ! nunit.extensions; contains *************** *** 38,42 **** Jedi.System.SourceVersioning.NUnit in 'source\Jedi.System.SourceVersioning.NUnit.pas', Jedi.Timers.EventScheduler_NUnit in 'source\Jedi.Timers.EventScheduler_NUnit.pas', ! Jedi.System.CommandLine.NUnit in 'source\Jedi.System.CommandLine.NUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.System')] --- 39,45 ---- Jedi.System.SourceVersioning.NUnit in 'source\Jedi.System.SourceVersioning.NUnit.pas', Jedi.Timers.EventScheduler_NUnit in 'source\Jedi.Timers.EventScheduler_NUnit.pas', ! Jedi.System.CommandLine.NUnit in 'source\Jedi.System.CommandLine.NUnit.pas', ! Jedi.Timers.Schedules.Generic in 'source\Jedi.Timers.Schedules.Generic.pas', ! Jedi.Timers.Schedules.BasicSchedules in 'source\Jedi.Timers.Schedules.BasicSchedules.pas'; [assembly: AssemblyTitle('Nunit.Jedi.System')] Index: Nunit.Jedi.System.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.System.bdsproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Nunit.Jedi.System.bdsproj 1 Mar 2005 15:07:27 -0000 1.9 --- Nunit.Jedi.System.bdsproj 16 Jun 2005 13:23:01 -0000 1.10 *************** *** 1,3 **** ! <?xml version="1.0" encoding="utf-8"?> <BorlandProject> <PersonalityInfo> --- 1,3 ---- ! <?xml version="1.0" encoding="utf-8"?> <BorlandProject> <PersonalityInfo> *************** *** 121,128 **** <Directories Name="PackageDCPOutputDir" Type="String">bin</Directories> <Directories Name="SearchPath" Type="String">$(BDS)\Lib;..\main\bin</Directories> ! <Directories Name="Packages" Type="String">System.XML.dll;System.Data.dll;Jedi.System;nunit.framework.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> ! <Directories Name="UsePackages" Type="Boolean">False</Directories> </Directories> <Parameters> --- 121,128 ---- <Directories Name="PackageDCPOutputDir" Type="String">bin</Directories> <Directories Name="SearchPath" Type="String">$(BDS)\Lib;..\main\bin</Directories> ! <Directories Name="Packages" Type="String">nunit.extensions.dll;System.XML.dll;System.Data.dll;Jedi.System;nunit.framework.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> ! <Directories Name="UsePackages" Type="Boolean">True</Directories> </Directories> <Parameters> *************** *** 172,180 **** <FileList> <File FileName="resources\Jedi.System.CommandLine.resx" ContainerId="ResXCompiler" ModuleName="Jedi.System.CommandLine"/> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Data" AssemblyName="system.data" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="system.xml" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="source\Jedi.System.Attributes.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Attributes.NUnit"/> <File FileName="source\Jedi.System.Strings.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Strings.NUnit"/> --- 172,181 ---- <FileList> <File FileName="resources\Jedi.System.CommandLine.resx" ContainerId="ResXCompiler" ModuleName="Jedi.System.CommandLine"/> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1882.30496" LinkUnits="False"/> <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Data" AssemblyName="system.data" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="system.xml" Version="1.0.5000.0" LinkUnits="False"/> + <File FileName="nunit.extensions.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.extensions" AssemblyName="nunit.extensions" Version="2.2.1.0" LinkUnits="False"/> <File FileName="source\Jedi.System.Attributes.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Attributes.NUnit"/> <File FileName="source\Jedi.System.Strings.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Strings.NUnit"/> *************** *** 182,185 **** --- 183,188 ---- <File FileName="source\Jedi.Timers.EventScheduler_NUnit.pas" ContainerId="" ModuleName="Jedi.Timers.EventScheduler_NUnit"/> <File FileName="source\Jedi.System.CommandLine.NUnit.pas" ContainerId="" ModuleName="Jedi.System.CommandLine.NUnit"/> + <File FileName="source\Jedi.Timers.Schedules.Generic.pas" ContainerId="" ModuleName="Jedi.Timers.Schedules.Generic"/> + <File FileName="source\Jedi.Timers.Schedules.BasicSchedules.pas" ContainerId="" ModuleName="Jedi.Timers.Schedules.BasicSchedules"/> </FileList> </DelphiDotNet.Personality> |
From: Marcel B. <jed...@us...> - 2005-06-16 13:21:17
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1769/nunit/source Modified Files: Jedi.System.CommandLine.NUnit.pas Log Message: * Added test sets for Boolean arguments * Added test sets for Enumeration arguments Index: Jedi.System.CommandLine.NUnit.pas =================================================================== RCS file: /cvsroot/jedidotnet/nunit/source/Jedi.System.CommandLine.NUnit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.System.CommandLine.NUnit.pas 1 Mar 2005 14:26:41 -0000 1.1 --- Jedi.System.CommandLine.NUnit.pas 16 Jun 2005 13:20:53 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- interface + {$REGION 'uses'} uses Jedi.System.CommandLine, *************** *** 10,17 **** --- 11,22 ---- System.IO, System.Resources; + {$ENDREGION} + {$REGION 'Helper types'} type ObjectArray = array of &Object; + {$ENDREGION} + {$REGION 'Base test fixture'} type BaseTestFixture = class *************** *** 38,42 **** --- 43,49 ---- [Test] procedure ResponseFile; virtual; end; + {$ENDREGION} + {$REGION 'Testing instance properties'} type InstanceSettings = class *************** *** 74,78 **** --- 81,87 ---- [TearDown] procedure DisposeInstance; end; + {$ENDREGION} + {$REGION 'Testing class properties in multiple classes'} type CompilerSettings = class *************** *** 118,122 **** --- 127,133 ---- [SetUp] procedure Initialize; end; + {$ENDREGION} + {$REGION 'Generic error tests'} type DoubleOptionSettings = class *************** *** 142,146 **** --- 153,159 ---- procedure UnknownArgument; end; + {$ENDREGION} + {$REGION 'Special cases'} type CaseSensitiveSettings = class *************** *** 188,191 **** --- 201,267 ---- [Test] procedure MixedNormalAndCustom; end; + {$ENDREGION} + + {$REGION 'Boolean cases'} + type + SettingsBoolean = class + strict private + class var FNoValueIgnores: Boolean; + class var FNoValueResets: Boolean; + class var FNoValueThrowsException: Boolean; + class var FNoValueToggles: Boolean; + class var FNoValueSets: Boolean; + public + class procedure Initialize; static; + public + [BooleanCommandLineArgument(CaseSensitive = False, Name= 'ignore', Prefix = '-', NoValueAction = Ignore)] + class property NoValueIgnores: Boolean read FNoValueIgnores write FNoValueIgnores; + [BooleanCommandLineArgument(CaseSensitive = False, Name= 'reset', Prefix = '-', NoValueAction = Reset)] + class property NoValueResets: Boolean read FNoValueResets write FNoValueResets; + [BooleanCommandLineArgument(CaseSensitive = False, Name= 'throw', Prefix = '-', NoValueAction = ThrowException)] + class property NoValueThrowsException: Boolean read FNoValueThrowsException write FNoValueThrowsException; + [BooleanCommandLineArgument(CaseSensitive = False, Name= 'toggle', Prefix = '-', NoValueAction = Toggle)] + class property NoValueToggles: Boolean read FNoValueToggles write FNoValueToggles; + [BooleanCommandLineArgument(CaseSensitive = False, Name= 'set', Prefix = '-', NoValueAction = &Set)] + class property NoValueSets: Boolean read FNoValueSets write FNoValueSets; + end; + + [TestFixture] + BooleanCases = class + public + [SetUp] procedure Initialize; + public + [Test] procedure NoValueIgnores; + [Test] procedure NoValueResets; + [ExpectedException(TypeOf(CommandLineException), 'Missing value. Argument: -throw')] + [Test] procedure NoValueThrowsException; + [Test] procedure NoValueToggles; + [Test] procedure NoValueSets; + end; + {$ENDREGION} + + type + EnumType = (None, FirstValue, SecondValue, ThirdValue); + + EnumSettings = class + strict private + class var FTest: EnumType; + public + class procedure Initialize; static; + public + [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'value', ValueSeparator = ':')] + class property Test: EnumType read FTest write FTest; + end; + + [TestFixture] + EnumCases = class + public + [SetUp] procedure Initialize; + public + [Test] procedure Value0; + [Test] procedure Value1; + [Test] procedure Value2; + [Test] procedure Value3; + end; implementation *************** *** 193,198 **** {$AUTOBOX ON} ! { BaseTestFixture } ! procedure BaseTestFixture.CreateDir; var --- 269,273 ---- {$AUTOBOX ON} ! {$REGION 'BaseTestFixture'} procedure BaseTestFixture.CreateDir; var *************** *** 289,295 **** Assert.AreEqual('file to compile.dpk', files[0], 'Wrong filename.'); end; ! { CaseSensitiveSettings } class procedure CaseSensitiveSettings.Initialize; begin --- 364,456 ---- Assert.AreEqual('file to compile.dpk', files[0], 'Wrong filename.'); end; + {$ENDREGION} ! {$REGION 'BooleanCases'} ! procedure BooleanCases.Initialize; ! begin ! SettingsBoolean.Initialize; ! end; ! ! procedure BooleanCases.NoValueIgnores; ! var ! files: array of string; ! begin ! files := CommandLine.Parse( ! 'process -ignore', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (1).'); ! Assert.IsFalse(SettingsBoolean.NoValueIgnores, '-ignore without value should be ignored (1).'); ! ! files := CommandLine.Parse( ! 'process -ignore+ -ignore', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (2).'); ! Assert.IsTrue(SettingsBoolean.NoValueIgnores, '-ignore without value should be ignored (2).'); ! end; ! ! procedure BooleanCases.NoValueResets; ! var ! files: array of string; ! begin ! files := CommandLine.Parse( ! 'process -reset', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (1).'); ! Assert.IsFalse(SettingsBoolean.NoValueResets, '-reset without value should reset (1).'); ! ! files := CommandLine.Parse( ! 'process -reset -reset', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (2).'); ! Assert.IsFalse(SettingsBoolean.NoValueResets, '-reset without value should reset (2).'); ! end; ! ! procedure BooleanCases.NoValueThrowsException; ! var ! files: array of string; ! begin ! files := CommandLine.Parse( ! 'process -throw', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned.'); ! Assert.IsFalse(SettingsBoolean.NoValueThrowsException, '-throw without value should toggle (1).'); ! end; ! ! procedure BooleanCases.NoValueToggles; ! var ! files: array of string; ! begin ! files := CommandLine.Parse( ! 'process -toggle', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (1).'); ! Assert.IsTrue(SettingsBoolean.NoValueToggles, '-toggle without value should toggle (1).'); ! ! files := CommandLine.Parse( ! 'process -toggle', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (2).'); ! Assert.IsFalse(SettingsBoolean.NoValueToggles, '-toggle without value should toggle (2).'); ! end; ! ! procedure BooleanCases.NoValueSets; ! var ! files: array of string; ! begin ! files := CommandLine.Parse( ! 'process -set', ! [TypeOf(SettingsBoolean)]); ! Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (1).'); ! Assert.IsTrue(SettingsBoolean.NoValueSets, '-set without value should set (1).'); + files := CommandLine.Parse( + 'process -set -set', + [TypeOf(SettingsBoolean)]); + Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned (2).'); + Assert.IsTrue(SettingsBoolean.NoValueSets, '-set without value should set (2).'); + end; + {$ENDREGION} + + {$REGION 'CaseSensitiveSettings'} class procedure CaseSensitiveSettings.Initialize; begin *************** *** 297,303 **** FOrigin := 0; end; ! { CompilerSettings } ! class constructor CompilerSettings.Create; begin --- 458,464 ---- FOrigin := 0; end; + {$ENDREGION} ! {$REGION 'CompilerSettings'} class constructor CompilerSettings.Create; begin *************** *** 309,315 **** FOptimization := False; end; ! { DirectorySettings } ! class constructor DirectorySettings.Create; begin --- 470,476 ---- FOptimization := False; end; + {$ENDREGION} ! {$REGION 'DirectorySettings'} class constructor DirectorySettings.Create; begin *************** *** 323,329 **** FUnitOutputPath := ''; end; ! { Errors } procedure Errors.DoubleOptions; begin --- 484,549 ---- FUnitOutputPath := ''; end; + {$ENDREGION} ! {$REGION 'EnumCases'} ! procedure EnumCases.Initialize; ! begin ! EnumSettings.Initialize; ! end; + procedure EnumCases.Value0; + var + files: array of string; + begin + EnumSettings.Test := ThirdValue; + files := CommandLine.Parse( + 'process -value:None', + [TypeOf(EnumSettings)]); + Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned.'); + Assert.AreEqual(EnumType.None, EnumSettings.Test, 'Test value error.'); + end; + + procedure EnumCases.Value1; + var + files: array of string; + begin + files := CommandLine.Parse( + 'process -value:FirstValue', + [TypeOf(EnumSettings)]); + Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned.'); + Assert.AreEqual(EnumType.FirstValue, EnumSettings.Test, 'Test value error.'); + end; + + procedure EnumCases.Value2; + var + files: array of string; + begin + files := CommandLine.Parse( + 'process -value:secondvalue', + [TypeOf(EnumSettings)]); + Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned.'); + Assert.AreEqual(EnumType.SecondValue, EnumSettings.Test, 'Test value error.'); + end; + + procedure EnumCases.Value3; + var + files: array of string; + begin + files := CommandLine.Parse( + 'process -value:ThirdValue', + [TypeOf(EnumSettings)]); + Assert.AreEqual(0, &Array(files).Length, 'wrong number of files returned.'); + Assert.AreEqual(EnumType.ThirdValue, EnumSettings.Test, 'Test value error.'); + end; + {$ENDREGION} + + {$REGION 'EnumSettings'} + class procedure EnumSettings.Initialize; + begin + FTest := None; + end; + {$ENDREGION} + + {$REGION 'Errors'} procedure Errors.DoubleOptions; begin *************** *** 344,350 **** [TypeOf(CompilerSettings), TypeOf(DirectorySettings)]); end; ! { InstanceSettings } ! constructor InstanceSettings.Create; begin --- 564,570 ---- [TypeOf(CompilerSettings), TypeOf(DirectorySettings)]); end; + {$ENDREGION} ! {$REGION 'InstanceSettings'} constructor InstanceSettings.Create; begin *************** *** 354,360 **** FUnitOutputPath := ''; end; ! { SettingsCustomProcessing } ! class procedure SettingsCustomProcessing.ProcessSize(match, commandLine: string; var index: Integer); var --- 574,580 ---- FUnitOutputPath := ''; end; + {$ENDREGION} ! {$REGION 'SettingsCustomProcessing'} class procedure SettingsCustomProcessing.ProcessSize(match, commandLine: string; var index: Integer); var *************** *** 403,409 **** FSize := System.Drawing.Size.Create(value, FSize.Height); end; ! { SpecialCases } procedure SpecialCases.CaseSensitive; begin --- 623,640 ---- FSize := System.Drawing.Size.Create(value, FSize.Height); end; + {$ENDREGION} ! {$REGION 'SettingsBoolean'} ! class procedure SettingsBoolean.Initialize; ! begin ! SettingsBoolean.FNoValueIgnores := False; ! SettingsBoolean.FNoValueResets := True; ! SettingsBoolean.FNoValueThrowsException := False; ! SettingsBoolean.FNoValueToggles := False; ! SettingsBoolean.FNoValueSets := False; ! end; ! {$ENDREGION} + {$REGION 'SpecialCases'} procedure SpecialCases.CaseSensitive; begin *************** *** 429,435 **** Assert.AreEqual(32, SettingsCustomProcessing.Height, 'Height not set correctly by -size option.'); end; ! { ToInstance } ! function ToInstance.AssemblyOutputPath: string; begin --- 660,666 ---- Assert.AreEqual(32, SettingsCustomProcessing.Height, 'Height not set correctly by -size option.'); end; + {$ENDREGION} ! {$REGION 'ToInstance'} function ToInstance.AssemblyOutputPath: string; begin *************** *** 467,473 **** Result := FInstance.UnitOutputPath; end; ! { ToMultipleClasses } ! function ToMultipleClasses.AssemblyOutputPath: string; begin --- 698,704 ---- Result := FInstance.UnitOutputPath; end; + {$ENDREGION} ! {$REGION 'ToMultipleClasses'} function ToMultipleClasses.AssemblyOutputPath: string; begin *************** *** 500,503 **** --- 731,735 ---- Result := DirectorySettings.UnitOutputPath; end; + {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2005-06-16 13:20:24
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1152/nunit/source Modified Files: Jedi.Timers.EventScheduler_NUnit.pas Log Message: Adapted to changes in ScheduledEvents Index: Jedi.Timers.EventScheduler_NUnit.pas =================================================================== RCS file: /cvsroot/jedidotnet/nunit/source/Jedi.Timers.EventScheduler_NUnit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Timers.EventScheduler_NUnit.pas 25 Jan 2005 10:25:56 -0000 1.1 --- Jedi.Timers.EventScheduler_NUnit.pas 16 Jun 2005 13:20:10 -0000 1.2 *************** *** 5,10 **** uses System.Collections, NUnit.Framework, ! Jedi.Timers.EventScheduler; type --- 5,13 ---- uses System.Collections, + System.Globalization, + System.Threading, NUnit.Framework, ! Jedi.Timers.EventScheduler, ! Jedi.Timers.Schedules; type *************** *** 15,19 **** FEveryTwoSecondsList: ArrayList; strict protected ! procedure EventCallback(event: ScheduledEvent); public [Test] procedure SingleScheduleEveryPointTwoSeconds; --- 18,22 ---- FEveryTwoSecondsList: ArrayList; strict protected ! procedure EventCallback(event: ScheduledEventBase); public [Test] procedure SingleScheduleEveryPointTwoSeconds; *************** *** 23,31 **** implementation ! uses ! System.Globalization, ! System.Threading; ! ! procedure EventScheduler.EventCallback(event: ScheduledEvent); begin if event = FEveryTwoSeconds then --- 26,30 ---- implementation ! procedure EventScheduler.EventCallback(event: ScheduledEventBase); begin if event = FEveryTwoSeconds then *************** *** 38,45 **** begin FEveryTwoSecondsList := ArrayList.Create; ! FEveryTwoSeconds := ScheduledEvent.Create(2000000, EventCallback); FirstTicks := FEveryTwoSeconds.ScheduledFor; Thread.Sleep(410); ! FEveryTwoSeconds.Interval := 0; // no more events Thread.Sleep(410); Assert.IsTrue(ScheduledEvents.HasStarted, 'Thread never started.'); --- 37,44 ---- begin FEveryTwoSecondsList := ArrayList.Create; ! FEveryTwoSeconds := ScheduledEvent.Create(MillisecondSchedule.Create(200), EventCallback); FirstTicks := FEveryTwoSeconds.ScheduledFor; Thread.Sleep(410); ! FEveryTwoSeconds.Schedule := nil; // no more events Thread.Sleep(410); Assert.IsTrue(ScheduledEvents.HasStarted, 'Thread never started.'); *************** *** 57,69 **** begin FEveryTwoSecondsList := ArrayList.Create; ! FEveryTwoSeconds := ScheduledEvent.Create(2000000, EventCallback); FirstTicks := FEveryTwoSeconds.ScheduledFor; repeat ! until DateTime.UtcNow.Ticks > (FirstTicks + 2100000); // Thread.Sleep(410); ! FEveryTwoSeconds.Interval := 0; // no more events // Thread.Sleep(410); repeat ! until DateTime.UtcNow.Ticks > (FirstTicks + 4200000); Console.WriteLine('Events {0}; Notifications: {0}', &Object(ScheduledEvents.EventsWaiting), &Object(ScheduledEvents.NotificationsWaiting)); Assert.IsTrue(ScheduledEvents.HasStarted, 'Thread never started.'); --- 56,68 ---- begin FEveryTwoSecondsList := ArrayList.Create; ! FEveryTwoSeconds := ScheduledEvent.Create(MillisecondSchedule.Create(200), EventCallback); FirstTicks := FEveryTwoSeconds.ScheduledFor; repeat ! until DateTime.Now.Ticks > (FirstTicks + 2100000); // Thread.Sleep(410); ! FEveryTwoSeconds.Schedule := nil; // no more events // Thread.Sleep(410); repeat ! until DateTime.Now.Ticks > (FirstTicks + 4200000); Console.WriteLine('Events {0}; Notifications: {0}', &Object(ScheduledEvents.EventsWaiting), &Object(ScheduledEvents.NotificationsWaiting)); Assert.IsTrue(ScheduledEvents.HasStarted, 'Thread never started.'); |
From: Marcel B. <jed...@us...> - 2005-06-16 13:19:52
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv943/nunit/source Added Files: Jedi.Timers.Schedules.BasicSchedules.pas Jedi.Timers.Schedules.Generic.pas Log Message: Test sets for new scheduling framework --- NEW FILE: Jedi.Timers.Schedules.Generic.pas --- unit Jedi.Timers.Schedules.Generic; interface {$REGION 'Uses'} uses Jedi.Timers.Schedules, NUnit.Framework, System.Collections; {$ENDREGION} {$REGION 'Common types'} type GetNextDateCallback = procedure (var date: DateTime) of object; {$ENDREGION} {$REGION 'Common test class'} type CommonTests = class abstract (&Object) public class procedure EnumerationTest(enum: IEnumerator; nextDateCallback: GetNextDateCallback); static; end; {$ENDREGION} {$REGION 'Generic test-set'} type [TestFixture] Generic = class strict protected class procedure Every4DaysOfEachMonthIn2005(var date: DateTime); static; class procedure Every4DaysOfEachTwoOrThreeMonthsIn2005(var date: DateTime); static; class procedure FirstOfEachMonthIn2005(var date: DateTime); static; class procedure MixedOfEachMonthIn2005(var date: DateTime); static; public [Test] procedure EnumerateNested; [Test] procedure EnumerateNestedNonRecursive; [Test] procedure EnumerateSimple; [Test] procedure EnumerateTwoNested; [Test] procedure EnumeratorWrapped; end; {$ENDREGION} implementation {$REGION 'Helper types'} type IntegerArray = array of Integer; {$ENDREGION} {$REGION 'DayList test schedule class'} type DayListSchedule = class (Schedule) {$REGION 'Constructor'} public constructor Create(dayList: IntegerArray); {$ENDREGION} {$REGION 'Data'} strict private FDays: IntegerArray; {$ENDREGION} {$REGION 'Overrides'} strict protected procedure GetLimitsForImpl(date: DateTime; out start, stop: DateTime); override; function GetNextImpl(date, offset, maxDate: DateTime): DateTime; override; function ScheduleLimit: TimeSpan; override; {$ENDREGION} end; {$ENDREGION} {$REGION 'Test schedule class'} type TestSchedule = class (Schedule) {$REGION 'DummySchedule'} strict protected type DummySchedule = class (Schedule) {$REGION 'Constructor'} public constructor Create(schedules: array of Schedule); strict protected {$ENDREGION} {$REGION 'Overrides'} strict protected procedure GetLimitsForImpl(date: DateTime; out start, stop: DateTime); override; function GetNextImpl(date, offset, maxDate: DateTime): DateTime; override; function ScheduleLimit: TimeSpan; override; {$ENDREGION} end; {$ENDREGION} {$REGION 'Constructors'} public constructor Create; overload; constructor Create(dayList: IntegerArray); overload; constructor Create(firstMonth, interval: Integer); overload; constructor Create(firstMonth, interval: Integer; dayList: IntegerArray); overload; class function Create(schedules: ScheduleArray): Schedule; overload; static; class function Create(dayList1, dayList2: IntegerArray): Schedule; overload; static; {$ENDREGION} {$REGION 'Data'} strict private FFirstMonth: Integer; FInterval: Integer; {$ENDREGION} {$REGION 'Overrides'} strict protected procedure GetLimitsForImpl(date: DateTime; out start, stop: DateTime); override; function GetNextImpl(date, offset, maxDate: DateTime): DateTime; override; function ScheduleLimit: TimeSpan; override; {$ENDREGION} end; {$ENDREGION} {$REGION 'CommonTests'} class procedure CommonTests.EnumerationTest(enum: IEnumerator; nextDateCallback: GetNextDateCallback); var iteration: Integer; date: DateTime; begin iteration := 1; date := DateTime.MinValue; nextDateCallback(date); while enum.MoveNext do begin Assert.IsFalse(date = DateTime.MaxValue, 'Iterated beyond limit. Iteration={0}, Date={1}', [iteration, enum.Current]); Assert.AreEqual(date, DateTime(enum.Current), 'Iteration={0}', [iteration]); nextDateCallback(date); Inc(iteration); end; Assert.IsTrue(date = DateTime.MaxValue, 'Enumeration end error. Iteration={0}', [iteration]); end; {$ENDREGION} {$REGION 'DayListSchedule'} constructor DayListSchedule.Create(dayList: IntegerArray); begin inherited Create(nil); FDays := IntegerArray(&Array(&Array(dayList).Clone)); &Array.Sort(FDays); end; procedure DayListSchedule.GetLimitsForImpl(date: DateTime; out start, stop: DateTime); var idx: Integer; parentStart: DateTime; parentStop: DateTime; begin // Console.WriteLine('{0}.GetLimitsForImpl({1})', GetType.FullName, date.ToString('dd-MM-yyyy HH:mm:ss.fffffff')); if Parent <> nil then begin Parent.GetLimitsFor(date, parentStart, parentStop); if date < parentStart then date := parentStart; end; idx := &Array.BinarySearch(&Array(FDays), &Object(date.Day)); if idx < 0 then idx := not idx else Inc(idx); if (idx < &Array(FDays).Length - 1) and (FDays[idx] <= DateTime.DaysInMonth(date.Year, date.Month)) then begin start := DateTime.Create(date.Year, date.Month, FDays[idx]); stop := start.AddDays(1).AddTicks(-1); end else begin start := DateTime.MaxValue; stop := DateTime.MaxValue; end; // Console.WriteLine('{0}.GetLimitsForImpl({1}) => start={2}, stop={3}', GetType.FullName, date.ToString('dd-MM-yyyy HH:mm:ss.fffffff'), start.ToString('dd-MM-yyyy HH:mm:ss.fffffff'), stop.ToString('dd-MM-yyyy HH:mm:ss.fffffff')); end; function DayListSchedule.GetNextImpl(date, offset, maxDate: DateTime): DateTime; var idx: Integer; begin if date < offset then idx := &Array.BinarySearch(&Array(FDays), &Object(offset.Day)) else idx := &Array.BinarySearch(&Array(FDays), &Object(date.Day)); if idx < 0 then idx := not idx else if date >= offset then Inc(idx); if date < offset then date := offset; if (idx < &Array(FDays).Length) and (FDays[idx] <= DateTime.DaysInMonth(date.Year, date.Month)) then Result := DateTime.Create(date.Year, date.Month, FDays[idx]) else Result := DateTime.MaxValue; if Result > maxDate then Result := DateTime.MaxValue; end; function DayListSchedule.ScheduleLimit: TimeSpan; begin Result := TimeSpan.FromDays(1); end; {$ENDREGION} {$REGION 'Generic'} procedure Generic.EnumerateNested; begin CommonTests.EnumerationTest( TestSchedule.Create(IntegerArray.Create(4, 8, 12, 16, 20, 24, 28)).GetEnumerator, Every4DaysOfEachMonthIn2005); end; procedure Generic.EnumerateNestedNonRecursive; begin CommonTests.EnumerationTest( TestSchedule.Create(IntegerArray.Create(4, 8, 12, 16, 20, 24, 28)).GetEnumerator(False), FirstOfEachMonthIn2005); end; procedure Generic.EnumerateSimple; begin CommonTests.EnumerationTest(TestSchedule.Create.GetEnumerator, FirstOfEachMonthIn2005); end; procedure Generic.EnumerateTwoNested; begin CommonTests.EnumerationTest( TestSchedule.Create( IntegerArray.Create(4, 8, 12, 16, 20, 24, 28), // odd months IntegerArray.Create(2, 6, 10, 14, 18, 22, 26, 30)).GetEnumerator, // even months MixedOfEachMonthIn2005); end; procedure Generic.EnumeratorWrapped; begin CommonTests.EnumerationTest( Schedule.Wrap( // Jan, Mar, Apr, May, Jul, Sep, Oct, Nov TestSchedule.Create( ScheduleArray.Create( TestSchedule.Create(1, 3), // Jan, Apr, Jul, Oct TestSchedule.Create(1, 2) // Jan, Mar, May, Jul, Sep, Nov )), [DayListSchedule.Create(IntegerArray.Create(4, 8, 12, 16, 20, 24, 28))] ).GetEnumerator, Every4DaysOfEachTwoOrThreeMonthsIn2005); end; class procedure Generic.Every4DaysOfEachMonthIn2005(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 4) else begin if (date.Day + 4) > DateTime.DaysInMonth(date.Year, date.Month) then date := DateTime.Create(date.Year, date.Month, 4).AddMonths(1) else date := date.AddDays(4); if date.Year = 2006 then date := DateTime.MaxValue; end; end; class procedure Generic.Every4DaysOfEachTwoOrThreeMonthsIn2005(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 4) else begin if (date.Day + 4) > DateTime.DaysInMonth(date.Year, date.Month) then begin date := DateTime.Create(date.Year, date.Month, 4).AddMonths(1); if date.Month in [2, 6, 8, 12] then date := date.AddMonths(1); end else date := date.AddDays(4); if date.Year = 2006 then date := DateTime.MaxValue; end; end; class procedure Generic.FirstOfEachMonthIn2005(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 1) else begin date := date.AddMonths(1); if date.Year = 2006 then date := DateTime.MaxValue; end; end; class procedure Generic.MixedOfEachMonthIn2005(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 4) else begin if (date.Day + 4) > DateTime.DaysInMonth(date.Year, date.Month) then date := DateTime.Create(date.Year, date.Month, 4 - 2 * (date.Month mod 2)).AddMonths(1) else date := date.AddDays(4); if date.Year = 2006 then date := DateTime.MaxValue; end; end; {$ENDREGION} {$REGION 'TestSchedule'} constructor TestSchedule.Create; begin inherited Create(nil); FFirstMonth := 1; FInterval := 1; end; constructor TestSchedule.Create(dayList: IntegerArray); begin inherited Create(ScheduleArray.Create(DayListSchedule.Create(dayList))); FFirstMonth := 1; FInterval := 1; end; constructor TestSchedule.Create(firstMonth, interval: Integer); begin inherited Create(nil); FFirstMonth := firstMonth; FInterval := interval; end; constructor TestSchedule.Create(firstMonth, interval: Integer; dayList: IntegerArray); begin inherited Create(ScheduleArray.Create(DayListSchedule.Create(dayList))); FFirstMonth := firstMonth; FInterval := interval; end; class function TestSchedule.Create(schedules: ScheduleArray): Schedule; begin Result := DummySchedule.Create(schedules); end; class function TestSchedule.Create(dayList1, dayList2: IntegerArray): Schedule; begin Result := DummySchedule.Create([ TestSchedule.Create(1, 2, dayList1), // January, March, May, July, September, November with dayList1 TestSchedule.Create(2, 2, dayList2) // Februari, April, June, August, October, December with dayList2 ]) end; procedure TestSchedule.GetLimitsForImpl(date: DateTime; out start, stop: DateTime); var month: Integer; begin if date.Year < 2005 then start := DateTime.Create(2005, FFirstMonth, 1) else if date.Year > 2005 then start := DateTime.MaxValue else begin month := FFirstMonth + FInterval * ((date.Month - FFirstMonth) div FInterval); if month < date.Month then Inc(month, FInterval); if month <= 12 then start := DateTime.Create(2005, month, 1) else start := DateTime.MaxValue; end; if start < DateTime.MaxValue.AddMonths(-1) then stop := start.AddMonths(1).AddTicks(-1) else stop := DateTime.MaxValue; end; function TestSchedule.GetNextImpl(date, offset, maxDate: DateTime): DateTime; var month: Integer; begin // Console.WriteLine('{0}.GetNextImpl({1},{2},{3})', GetType.FullName, date.ToString('dd-MM-yyyy HH:mm:ss.fffffff'), // offset.ToString('dd-MM-yyyy HH:mm:ss.fffffff'), maxDate.ToString('dd-MM-yyyy HH:mm:ss.fffffff')); if date < DateTime.Create(2005, 1, 1) then date := DateTime.Create(2005, 1, 1); // else begin month := FFirstMonth + FInterval * ((date.Month - FFirstMonth) div FInterval); if month < FFirstMonth then month := FFirstMonth; if (month < date.Month) or (date.Day > 1) or (date.TimeOfDay.Ticks > 0) then Inc(month, FInterval); end; if month <= 12 then Result := DateTime.Create(2005, month, 1) else Result := DateTime.MaxValue; if Result >= DateTime.Create(2006, 1, 1) then Result := DateTime.MaxValue; // Console.WriteLine(' Result={0}', Result.ToString('dd-MM-yyyy HH:mm:ss.fffffff')); end; function TestSchedule.ScheduleLimit: TimeSpan; begin Result := TimeSpan.FromDays(365); end; {$ENDREGION} {$REGION 'TestSchedule.DummySchedule'} constructor TestSchedule.DummySchedule.Create(schedules: array of Schedule); begin inherited Create(schedules); end; procedure TestSchedule.DummySchedule.GetLimitsForImpl(date: DateTime; out start, stop: DateTime); begin if date < DateTime.MaxValue then start := DateTime.MinValue else start := DateTime.MaxValue; stop := DateTime.MaxValue; end; function TestSchedule.DummySchedule.GetNextImpl(date, offset, maxDate: DateTime): DateTime; begin Result := DateTime.MaxValue; end; function TestSchedule.DummySchedule.ScheduleLimit: TimeSpan; begin Result := TimeSpan.MaxValue; end; {$ENDREGION} end. --- NEW FILE: Jedi.Timers.Schedules.BasicSchedules.pas --- unit Jedi.Timers.Schedules.BasicSchedules; interface {$REGION 'Uses'} uses Jedi.Timers.Schedules, Jedi.Timers.Schedules.Generic, NUnit.Framework, System.Collections; {$ENDREGION} {$REGION 'DaySchedule test set'} type [TestFixture] DaySchedule = class strict protected class procedure Every3DaysFromMonth12ToMonth47(var date: DateTime); static; class procedure EveryDayEvery9MonthsEveryYearFrom2005To2010(var date: DateTime); static; class procedure EveryDayFromMonth12ToMonth47(var date: DateTime); static; public [Test] procedure Enumerate_Every3DaysFromJanOf0002ToDecOf0002; [Test] procedure Enumerate_EveryDayFromJanOf0002ToDecOf0002; [Test] procedure Enumerate_EveryDayInEvery9MonthsOfEveryYearFrom2005To2010; // [Test] procedure Enumerate_Every11DaysInEvery3MonthsFromFebToSepInEvery4YearsFrom2005To2050; end; {$ENDREGION} {$REGION 'MonthSchedule test set'} type [TestFixture] MonthSchedule = class strict protected class procedure EveryMonthFrom12To47(var date: DateTime); static; class procedure EveryMonthFrom0To11Every2YearsFrom2005To2010(var date: DateTime); static; class procedure Every3MonthsFrom1To8Every4YearsFrom2005To2050(var date: DateTime); static; class procedure Every3MonthsFrom12To47(var date: DateTime); static; public [Test] procedure JanOf0001ToMonthNumber; [Test] procedure JanOf0002ToMonthNumber; [Test] procedure Month000000ToDateTime; [Test] procedure Month000011ToDateTime; [Test] procedure Month000012ToDateTime; [Test] procedure Month119987ToDateTime; [Test] procedure DecOf0002ToMonthNumber; [Test] procedure DecOf9999ToMonthNumber; [Test] procedure Enumerate_EveryMonthFromJanOf0002ToDecOf0004; [Test] procedure Enumerate_EveryThreeMonthsFromJanOf0002ToDecOf0004; [Test] procedure Enumerate_EveryMonthFromJanToDecInEvery2YearsFrom2005To2010; [Test] procedure Enumerate_Every3MonthsFromFebToSepInEvery4YearsFrom2005To2050; end; {$ENDREGION} {$REGION 'YearSchedule test set'} type [TestFixture] YearSchedule = class strict protected class procedure NextDateJanFirstOf2004To2008(var date: DateTime); static; class procedure NextDateJanFirstOfEveryFiveYearsFrom2000To3000(var date: DateTime); static; public [Test] procedure Enumerate_2004To2008; [Test] procedure Enumerate_EveryFiveYearsFrom2000To3000; end; {$ENDREGION} implementation {$REGION 'DaySchedule'} class procedure DaySchedule.Every3DaysFromMonth12ToMonth47(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2, 1, 1) else begin date := date.AddDays(3); if date > DateTime.Create(2, 12, 31) then date := DateTime.MaxValue; end; end; class procedure DaySchedule.EveryDayEvery9MonthsEveryYearFrom2005To2010(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 1) else begin date := date.AddDays(1); if date.Day = 1 then begin if date.Month = 2 then // We've just ended Januari, so skip to date := date.AddMonths(8) // October of the same year else // we must have ended October, so we skip to date := date.AddMonths(2); // Januari of next year end; if date > DateTime.Create(2010, 12, 31) then date := DateTime.MaxValue; end; end; class procedure DaySchedule.EveryDayFromMonth12ToMonth47(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2, 1, 1) else begin date := date.AddDays(1); if date > DateTime.Create(2, 12, 31) then date := DateTime.MaxValue; end; end; procedure DaySchedule.Enumerate_Every3DaysFromJanOf0002ToDecOf0002; begin CommonTests.EnumerationTest( Jedi.Timers.Schedules.DaySchedule.Create( 3, DateTime.Create(2, 1, 1).Ticks div TimeSpan.TicksPerDay, DateTime.Create(2, 12, 31).Ticks div TimeSpan.TicksPerDay).GetEnumerator, Every3DaysFromMonth12ToMonth47); end; procedure DaySchedule.Enumerate_EveryDayFromJanOf0002ToDecOf0002; begin CommonTests.EnumerationTest( Jedi.Timers.Schedules.DaySchedule.Create( DateTime.Create(2, 1, 1).Ticks div TimeSpan.TicksPerDay, DateTime.Create(2, 12, 31).Ticks div TimeSpan.TicksPerDay).GetEnumerator, EveryDayFromMonth12ToMonth47); end; procedure DaySchedule.Enumerate_EveryDayInEvery9MonthsOfEveryYearFrom2005To2010; begin CommonTests.EnumerationTest( Jedi.Timers.Schedules.YearSchedule.Create( 2005, // Start with year 2005 2010, [ // End with year 2010 Jedi.Timers.Schedules.MonthSchedule.Create( // for each year: 9, // each 9 month interval 0, // from the first month of the year 11, [ // to the last month of the year Jedi.Timers.Schedules.DaySchedule.Create( // for each available month: 0, // from the first day of the month 100) // to the last day of the month (must be > 31 for this) ]) ]).GetEnumerator, EveryDayEvery9MonthsEveryYearFrom2005To2010); end; {$ENDREGION} {$REGION 'MonthSchedule'} class procedure MonthSchedule.EveryMonthFrom12To47(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2, 1, 1) else begin date := date.AddMonths(1); if date > DateTime.Create(4, 12, 1) then date := DateTime.MaxValue; end; end; class procedure MonthSchedule.EveryMonthFrom0To11Every2YearsFrom2005To2010(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 1, 1) else begin date := date.AddMonths(1); if date.Month = 1 then date := date.AddYears(1); // skip a year if date.Year > 2010 then date := DateTime.MaxValue; end; end; class procedure MonthSchedule.Every3MonthsFrom1To8Every4YearsFrom2005To2050(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2005, 2, 1) else begin date := date.AddMonths(3); if date.Month > 9 then date := DateTime.Create(date.Year + 4, 2, 1); // start of the next year (four years from the current year) if date.Year > 2050 then date := DateTime.MaxValue; end; end; class procedure MonthSchedule.Every3MonthsFrom12To47(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2, 1, 1) else begin date := date.AddMonths(3); if date > DateTime.Create(4, 12, 1) then date := DateTime.MaxValue; end; end; procedure MonthSchedule.JanOf0001ToMonthNumber; begin Assert.AreEqual(0, Jedi.Timers.Schedules.MonthSchedule.ToMonths(DateTime.Create(1, 1, 1))); end; procedure MonthSchedule.JanOf0002ToMonthNumber; begin Assert.AreEqual(12, Jedi.Timers.Schedules.MonthSchedule.ToMonths(DateTime.Create(2, 1, 1))); end; procedure MonthSchedule.Month000000ToDateTime; begin Assert.AreEqual(DateTime.Create(1, 1, 1), Jedi.Timers.Schedules.MonthSchedule.FromMonths(0)); end; procedure MonthSchedule.Month000011ToDateTime; begin Assert.AreEqual(DateTime.Create(1, 12, 1), Jedi.Timers.Schedules.MonthSchedule.FromMonths(11)); end; procedure MonthSchedule.Month000012ToDateTime; begin Assert.AreEqual(DateTime.Create(2, 1, 1), Jedi.Timers.Schedules.MonthSchedule.FromMonths(12)); end; procedure MonthSchedule.Month119987ToDateTime; begin Assert.AreEqual(DateTime.Create(9999, 12, 1), Jedi.Timers.Schedules.MonthSchedule.FromMonths(119987)); end; procedure MonthSchedule.DecOf0002ToMonthNumber; begin Assert.AreEqual(23, Jedi.Timers.Schedules.MonthSchedule.ToMonths(DateTime.Create(2, 12, 1))); end; procedure MonthSchedule.DecOf9999ToMonthNumber; begin Assert.AreEqual(119987, Jedi.Timers.Schedules.MonthSchedule.ToMonths(DateTime.Create(9999, 12, 1))); end; procedure MonthSchedule.Enumerate_EveryMonthFromJanOf0002ToDecOf0004; begin CommonTests.EnumerationTest(Jedi.Timers.Schedules.MonthSchedule.Create(12, 47).GetEnumerator, EveryMonthFrom12To47); end; procedure MonthSchedule.Enumerate_EveryThreeMonthsFromJanOf0002ToDecOf0004; begin CommonTests.EnumerationTest(Jedi.Timers.Schedules.MonthSchedule.Create(3, 12, 47).GetEnumerator, Every3MonthsFrom12To47); end; procedure MonthSchedule.Enumerate_EveryMonthFromJanToDecInEvery2YearsFrom2005To2010; begin CommonTests.EnumerationTest( Jedi.Timers.Schedules.YearSchedule.Create(2, 2005, 2010, [ // Every two years from 2005 to 2010 Jedi.Timers.Schedules.MonthSchedule.Create(0, 100) // Every month from Januari to December; note that // end value is unimportant, as long as it is >= 11 ]).GetEnumerator, EveryMonthFrom0To11Every2YearsFrom2005To2010); end; procedure MonthSchedule.Enumerate_Every3MonthsFromFebToSepInEvery4YearsFrom2005To2050; begin CommonTests.EnumerationTest( Jedi.Timers.Schedules.YearSchedule.Create(4, 2005, 2050, [ // Every four years from 2005 to 2050 Jedi.Timers.Schedules.MonthSchedule.Create(3, 1, 8) // Every three months from Februari to September ]).GetEnumerator, Every3MonthsFrom1To8Every4YearsFrom2005To2050); end; {$ENDREGION} {$REGION 'YearSchedule'} procedure YearSchedule.Enumerate_2004To2008; begin CommonTests.EnumerationTest(Jedi.Timers.Schedules.YearSchedule.Create(2004, 2008).GetEnumerator, NextDateJanFirstOf2004To2008); end; procedure YearSchedule.Enumerate_EveryFiveYearsFrom2000To3000; begin CommonTests.EnumerationTest(Jedi.Timers.Schedules.YearSchedule.Create(5, 2000, 3000).GetEnumerator, NextDateJanFirstOfEveryFiveYearsFrom2000To3000); end; class procedure YearSchedule.NextDateJanFirstOf2004To2008(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2004, 1, 1) else date := DateTime.Create(date.Year + 1, 1, 1); if date.Year > 2008 then date := DateTime.MaxValue; end; class procedure YearSchedule.NextDateJanFirstOfEveryFiveYearsFrom2000To3000(var date: DateTime); begin if date = DateTime.MinValue then date := DateTime.Create(2000, 1, 1) else date := DateTime.Create(date.Year + 5, 1, 1); if date.Year > 3000 then date := DateTime.MaxValue; end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2005-06-16 13:18:16
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32276/main/run Modified Files: Jedi.System.CommandLine.pas Log Message: * Adapted to allow other types be handled * Added True/False values to Boolean arguments * Added property to specify what to do if a boolean argument doesn't have a value (always set, always reset, toggle, ignore, throw exception) * Added Enum handling Index: Jedi.System.CommandLine.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.CommandLine.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Jedi.System.CommandLine.pas 14 Mar 2005 13:30:13 -0000 1.4 --- Jedi.System.CommandLine.pas 16 Jun 2005 13:18:02 -0000 1.5 *************** *** 20,32 **** Known Issues: - - Is only able to handle Boolean, Integer (unsigned Int16, Int32 and Int64) and String types. - Other types require the user to write their own processing method and register the method as a - command line argument. - If an argument starts with any of the starting symbols of the registered switches, an exception is thrown ('unknown argument'). Future version will allow you to specify an option if unknown switches should be ignored or result in an exception thrown. - - Boolean type switches not having a + or - behind the option work as a toggle at all times. - Future version will allow you to specify if the switch is a toggle or will result in the 'True' - value if neither '+' or '-' follows the switch. ---------------------------------------------------------------------------------------------------} // $Id$ --- 20,26 ---- *************** *** 71,74 **** --- 65,72 ---- '$Date$')] CommandLine = class + {$REGION 'Constructor'} + strict protected + constructor Create(arguments: array of &Object; responseFilePrefix: string); + {$ENDREGION} {$REGION 'Data'} strict private *************** *** 78,91 **** FResponseFilePrefix: string; {$ENDREGION} ! {$REGION 'Constructor'} ! strict protected ! constructor Create(arguments: array of &Object; responseFilePrefix: string); ! {$ENDREGION} ! {$REGION 'Nested type: Argument class'} ! protected type ! Argument = class (&Object, IComparable) {$REGION 'Constructor'} ! public constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); {$ENDREGION} --- 76,87 ---- FResponseFilePrefix: string; {$ENDREGION} ! {$REGION 'Argument class'} ! public type ! Argument = class abstract (&Object, IComparable) {$REGION 'Constructor'} ! strict private ! class constructor Create; ! strict protected constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); {$ENDREGION} *************** *** 96,99 **** --- 92,97 ---- FMatches: string; FMemberInfo: MemberInfo; + strict private + class var FTypeHandlers: Hashtable; {$ENDREGION} {$REGION 'IComparable method'} *************** *** 101,111 **** function CompareTo(obj: &Object): Integer; {$ENDREGION} ! {$REGION 'Type specific processing methods'} strict protected ! procedure ProcessBoolean(match, commandLine: string; var index: Integer); ! procedure ProcessInt(match, commandLine: string; var index: Integer); ! procedure ProcessString(match, commandLine: string; var index: Integer); {$ENDREGION} ! {$REGION 'Public method'} public procedure Process(commandLine: string; var index: Integer); --- 99,113 ---- function CompareTo(obj: &Object): Integer; {$ENDREGION} ! {$REGION 'Protected methods'} ! protected ! class function TypeHandlers: Hashtable; static; ! {$ENDREGION} ! {$REGION 'Abstract methods'} strict protected ! procedure ProcessImpl(match, commandLine: string; var index: Integer); virtual; abstract; {$ENDREGION} ! {$REGION 'Public methods'} ! public ! class procedure RegisterHandler(valueType, argumentType: &Type); static; public procedure Process(commandLine: string; var index: Integer); *************** *** 120,123 **** --- 122,210 ---- end; {$ENDREGION} + {$REGION 'Boolean argument class'} + public + type + BooleanArgument = class (Argument) + {$REGION 'Constructor'} + public + constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); + {$ENDREGION} + {$REGION 'No-value action enumeration'} + public + type + NoValueActionEnum = (Toggle, &Set, Reset, ThrowException, Ignore); + {$ENDREGION} + {$REGION 'Data'} + strict private + FFalseValues: array of string; + FNoValueAction: CommandLine.BooleanArgument.NoValueActionEnum; + FTrueValues: array of string; + {$ENDREGION} + {$REGION 'Overrides'} + strict protected + procedure ProcessImpl(match, commandLine: string; var index: Integer); override; + {$ENDREGION} + {$REGION 'Properties'} + public + property NoValueAction: CommandLine.BooleanArgument.NoValueActionEnum read FNoValueAction; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'Custom-processing argument class'} + protected + type + CustomProcessingArgument = class (Argument) + {$REGION 'Constructor'} + public + constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); + {$ENDREGION} + {$REGION 'Overrides'} + strict protected + procedure ProcessImpl(match, commandLine: string; var index: Integer); override; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'Enumeration argument class'} + public + type + EnumArgument = class (Argument) + {$REGION 'Constructor'} + public + constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); + {$ENDREGION} + {$REGION 'Overrides'} + strict protected + procedure ProcessImpl(match, commandLine: string; var index: Integer); override; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'Integer argument class'} + public + type + IntegerArgument = class (Argument) + {$REGION 'Constructor'} + public + constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); + {$ENDREGION} + {$REGION 'Overrides'} + strict protected + procedure ProcessImpl(match, commandLine: string; var index: Integer); override; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'String argument class'} + public + type + StringArgument = class (Argument) + {$REGION 'Constructor'} + public + constructor Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); + {$ENDREGION} + {$REGION 'Overrides'} + strict protected + procedure ProcessImpl(match, commandLine: string; var index: Integer); override; + {$ENDREGION} + end; + {$ENDREGION} {$REGION 'Protected methods'} strict protected *************** *** 133,136 **** --- 220,225 ---- procedure RegisterType(&type: &Type); overload; procedure RegisterType(&type: &Type; instance: &Object); overload; + protected + function FindTypeHandler(&type: &Type): &Type; {$ENDREGION} {$REGION 'Public static methods'} *************** *** 151,155 **** '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = True, &Inherited = False)] CommandLineArgumentAttribute = class (Attribute) {$REGION 'Data'} --- 240,244 ---- '$Revision$', '$Date$'), ! AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = False, &Inherited = False)] CommandLineArgumentAttribute = class (Attribute) {$REGION 'Data'} *************** *** 199,208 **** {$ENDREGION} implementation {$AUTOBOX ON} ! {$REGION 'CommandLine'} constructor CommandLine.Create(arguments: array of &Object; responseFilePrefix: string); begin --- 288,397 ---- {$ENDREGION} + {$REGION 'Boolean options attribute'} + type + [JediSourceInfo( + '$Source$', + '$Revision$', + '$Date$'), + AttributeUsage(AttributeTargets.Property or AttributeTargets.Method, AllowMultiple = False, &Inherited = False)] + BooleanCommandLineArgumentAttribute = class (CommandLineArgumentAttribute) + {$REGION 'Constructor'} + public + constructor Create; + {$ENDREGION} + {$REGION 'Data'} + strict private + FFalseValues: ArrayList; + FNoValueAction: CommandLine.BooleanArgument.NoValueActionEnum; + FTrueValues: ArrayList; + {$ENDREGION} + {$REGION 'Property access methods'} + public + function get_FalseValue: string; + function get_FalseValueCount: Integer; + function get_FalseValues(index: Integer): string; + function get_TrueValue: string; + function get_TrueValueCount: Integer; + function get_TrueValues(index: Integer): string; + procedure set_FalseValue(value: string); + procedure set_TrueValue(value: string); + {$ENDREGION} + {$REGION 'Properties'} + protected + property FalseValueList: ArrayList read FFalseValues; + property TrueValueList: ArrayList read FTrueValues; + public + property FalseValue: string read get_FalseValue write set_FalseValue; + property FalseValueCount: Integer read get_FalseValueCount; + property FalseValues[&index: Integer]: string read get_FalseValues; + property NoValueAction: CommandLine.BooleanArgument.NoValueActionEnum read FNoValueAction write FNoValueAction; + property TrueValue: string read get_TrueValue write set_TrueValue; + property TrueValueCount: Integer read get_TrueValueCount; + property TrueValues[&index: Integer]: string read get_TrueValues; + {$ENDREGION} + end; + {$ENDREGION} + implementation {$AUTOBOX ON} ! {$REGION 'BooleanCommandLineArgumentAttribute'} ! constructor BooleanCommandLineArgumentAttribute.Create; ! begin ! inherited Create; ! FFalseValues := ArrayList.Create; ! FNoValueAction := Toggle; ! FTrueValues := ArrayList.Create; ! end; ! ! function BooleanCommandLineArgumentAttribute.get_FalseValue: string; ! begin ! if FFalseValues.Count = 0 then ! Result := '' ! else ! Result := string(FFalseValues[FFalseValues.Count - 1]); ! end; ! ! function BooleanCommandLineArgumentAttribute.get_FalseValueCount: Integer; ! begin ! Result := FFalseValues.Count; ! end; ! ! function BooleanCommandLineArgumentAttribute.get_FalseValues(index: Integer): string; ! begin ! Result := string(FFalseValues[index]); ! end; ! ! function BooleanCommandLineArgumentAttribute.get_TrueValue: string; ! begin ! if FTrueValues.Count = 0 then ! Result := '' ! else ! Result := string(FTrueValues[FTrueValues.Count - 1]); ! end; ! ! function BooleanCommandLineArgumentAttribute.get_TrueValueCount: Integer; ! begin ! Result := FTrueValues.Count; ! end; ! ! function BooleanCommandLineArgumentAttribute.get_TrueValues(index: Integer): string; ! begin ! Result := string(FTrueValues[index]); ! end; ! ! procedure BooleanCommandLineArgumentAttribute.set_FalseValue(value: string); ! begin ! FFalseValues.Add(value); ! end; ! ! procedure BooleanCommandLineArgumentAttribute.set_TrueValue(value: string); ! begin ! FTrueValues.Add(value); ! end; ! {$ENDREGION} + {$REGION 'CommandLine'} constructor CommandLine.Create(arguments: array of &Object; responseFilePrefix: string); begin *************** *** 286,289 **** --- 475,488 ---- end; + function CommandLine.FindTypeHandler(&type: &Type): &Type; + begin + Result := nil; + while (Result = nil) and (&type <> nil) do + begin + Result := System.Type(Argument.TypeHandlers[&type]); + &type := &type.BaseType; + end; + end; + class function CommandLine.GetLiteral(commandLine: string; var index: Integer): string; var *************** *** 368,378 **** attr: CommandLineArgumentAttribute); var thisMatch: string; argument: CommandLine.Argument; idx: Integer; begin for thisMatch in attr.GetMatches do begin ! argument := CommandLine.Argument.Create(thisMatch, attr.CaseSensitive, instance, memberInfo); idx := FArguments.BinarySearch(argument); if idx >= 0 then --- 567,593 ---- attr: CommandLineArgumentAttribute); var + argType: &Type; + ciArgument: ConstructorInfo; thisMatch: string; argument: CommandLine.Argument; idx: Integer; begin + if PropertyInfo(memberInfo) = nil then + argType := TypeOf(CommandLine.CustomProcessingArgument) + else + begin + argType := FindTypeHandler(PropertyInfo(memberInfo).PropertyType); + if argType = nil then + raise CommandLineException.Create(System.String.Format( + 'No argument handler defined for type {0}', PropertyInfo(memberInfo).PropertyType.FullName)); + end; + ciArgument := argType.GetConstructor(BindingFlags.Instance or BindingFlags.NonPublic or BindingFlags.Public, nil, + [TypeOf(System.String), TypeOf(System.Boolean), TypeOf(&Object), TypeOf(MemberInfo)], nil); + if ciArgument = nil then + raise CommandLineException.Create(System.String.Format( + 'Handler {0} has no compatible constructor', argType.FullName)); for thisMatch in attr.GetMatches do begin ! argument := CommandLine.Argument(ciArgument.Invoke([thisMatch, attr.CaseSensitive, instance, memberInfo])); idx := FArguments.BinarySearch(argument); if idx >= 0 then *************** *** 469,472 **** --- 684,702 ---- {$REGION 'CommandLine.Argument'} + class constructor CommandLine.Argument.Create; + begin + RegisterHandler(TypeOf(System.Boolean), TypeOf(CommandLine.BooleanArgument)); + RegisterHandler(TypeOf(System.Byte), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.Enum), TypeOf(CommandLine.EnumArgument)); + RegisterHandler(TypeOf(System.Int16), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.Int32), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.Int64), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.SByte), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.UInt16), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.UInt32), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.UInt64), TypeOf(CommandLine.IntegerArgument)); + RegisterHandler(TypeOf(System.String), TypeOf(CommandLine.StringArgument)); + end; + constructor CommandLine.Argument.Create(matches: string; caseSensitive: Boolean; instance: &Object; memberInfo: MemberInfo); *************** *** 476,480 **** raise ArgumentNullException.Create('memberInfo'); if matches = '' then ! raise ArgumentException.Create('Cannot me an empty string', 'matches'); FCaseSensitive := caseSensitive; FInstance := instance; --- 706,710 ---- raise ArgumentNullException.Create('memberInfo'); if matches = '' then ! raise ArgumentException.Create('Cannot be an empty string', 'matches'); FCaseSensitive := caseSensitive; FInstance := instance; *************** *** 511,516 **** var match: string; - pi: PropertyInfo; - params: array of &Object; begin match := commandLine.Substring(index, FMatches.Length); --- 741,744 ---- *************** *** 519,582 **** while (index < commandLine.Length) and (commandLine.Chars[index] = ' ') do Inc(index); ! pi := PropertyInfo(FMemberInfo); ! if pi = nil then begin ! params := ObjectArray.Create(match, commandLine, index); ! MethodInfo(FMemberInfo).Invoke(FInstance, params); ! index := Integer(params[2]); ! end ! else ! if TypeOf(System.Boolean).IsAssignableFrom(pi.PropertyType) then ! ProcessBoolean(match, commandLine, index) ! else ! if TypeOf(System.Int16).IsAssignableFrom(pi.PropertyType) or ! TypeOf(System.Int32).IsAssignableFrom(pi.PropertyType) or ! TypeOf(System.Int64).IsAssignableFrom(pi.PropertyType) then ! ProcessInt(match, commandLine, index) ! else ! if TypeOf(System.String).IsAssignableFrom(pi.PropertyType) then ! ProcessString(match, commandLine, index) end; ! procedure CommandLine.Argument.ProcessBoolean(match, commandLine: string; var index: Integer); var value: string; begin value := Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index); - if value = '+' then - PropertyInfo(FMemberInfo).SetValue(FInstance, True, []) - else - if value = '-' then - PropertyInfo(FMemberInfo).SetValue(FInstance, False, []) - else if value = '' then ! PropertyInfo(FMemberInfo).SetValue(FInstance, not Boolean(PropertyInfo(FMemberInfo).GetValue(FInstance, [])), []) else ! raise CommandLineException.Create(System.String.Format('Invalid boolean value. Argument: {0}. Value: {1}', Matches, value)); end; ! procedure CommandLine.Argument.ProcessInt(match, commandLine: string; var index: Integer); var value: string; pi: PropertyInfo; - flags: BindingFlags; begin value := Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index); ! pi := PropertyInfo(FMemberInfo); ! if FInstance = nil then ! flags := BindingFlags.Static ! else ! flags := BindingFlags.Instance; ! flags := flags or BindingFlags.Public or BindingFlags.NonPublic or BindingFlags.InvokeMethod; pi.SetValue( ! FInstance, ! pi.PropertyType.InvokeMember('Parse', flags, nil, FInstance, [value, NumberFormatInfo.InvariantInfo], [], ! CultureInfo.InvariantCulture, ['s', 'provider']), []); end; ! procedure CommandLine.Argument.ProcessString(match, commandLine: string; var index: Integer); begin ! PropertyInfo(FMemberInfo).SetValue(FInstance, Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index), []); end; {$ENDREGION} --- 747,910 ---- while (index < commandLine.Length) and (commandLine.Chars[index] = ' ') do Inc(index); ! ProcessImpl(match, commandLine, index); ! end; ! ! class procedure CommandLine.Argument.RegisterHandler(valueType, argumentType: &Type); ! begin ! if valueType = nil then ! raise ArgumentNullException.Create('valueType'); ! if argumentType = nil then ! raise ArgumentNullException.Create('argumentType'); ! if not argumentType.IsSubclassOf(TypeOf(CommandLine.Argument)) then ! raise ArgumentException.Create( ! System.String.Format('Type handler must be derived from {0}', TypeOf(CommandLine.Argument).FullName), 'argumentType'); ! TypeHandlers[valueType] := argumentType; ! end; ! ! class function CommandLine.Argument.TypeHandlers: Hashtable; ! begin ! if FTypeHandlers = nil then ! FTypeHandlers := HashTable.Create; ! Result := FTypeHandlers; ! end; ! {$ENDREGION} ! ! {$REGION 'CommandLine.BooleanArgument'} ! constructor CommandLine.BooleanArgument.Create(matches: string; caseSensitive: Boolean; instance: &Object; ! memberInfo: MemberInfo); ! var ! attrs: array of &Object; ! boolOptAttr: BooleanCommandLineArgumentAttribute; ! begin ! inherited Create(matches, caseSensitive, instance, memberInfo); ! FFalseValues := StringArray.Create('-'); ! FNoValueAction := Toggle; ! FTrueValues := StringArray.Create('+'); ! attrs := memberInfo.GetCustomAttributes(TypeOf(BooleanCommandLineArgumentAttribute), False); ! if &Array(attrs).Length > 0 then begin ! boolOptAttr := BooleanCommandLineArgumentAttribute(attrs[0]); ! if boolOptAttr.FalseValueList.Count > 0 then ! begin ! FFalseValues := StringArray(boolOptAttr.FalseValueList.ToArray(TypeOf(System.String))); ! &Array.Sort(&Array(FFalseValues), CaseInsensitiveComparer.DefaultInvariant); ! end; ! FNoValueAction := boolOptAttr.NoValueAction; ! if boolOptAttr.TrueValueList.Count > 0 then ! begin ! FTrueValues := StringArray(boolOptAttr.TrueValueList.ToArray(TypeOf(System.String))); ! &Array.Sort(&Array(FTrueValues), CaseInsensitiveComparer.DefaultInvariant); ! end; ! end; end; ! procedure CommandLine.BooleanArgument.ProcessImpl(match, commandLine: string; var index: Integer); var value: string; + idx: Integer; begin value := Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index); if value = '' then ! begin ! case NoValueAction of ! Toggle: ! PropertyInfo(MemberInfo).SetValue(Instance, not Boolean(PropertyInfo(MemberInfo).GetValue(Instance, [])), []); ! &Set: ! PropertyInfo(MemberInfo).SetValue(Instance, True, []); ! Reset: ! PropertyInfo(MemberInfo).SetValue(Instance, False, []); ! ThrowException: ! raise CommandLineException.Create(System.String.Format( ! 'Missing value. Argument: {0}', Matches)); ! end; ! end else ! begin ! idx := &Array.BinarySearch(&Array(FTrueValues), value, CaseInsensitiveComparer.DefaultInvariant); ! if idx >= 0 then ! PropertyInfo(MemberInfo).SetValue(Instance, True, []) ! else ! begin ! idx := &Array.BinarySearch(&Array(FFalseValues), value, CaseInsensitiveComparer.DefaultInvariant); ! if idx >= 0 then ! PropertyInfo(MemberInfo).SetValue(Instance, False, []) ! else ! raise CommandLineException.Create(System.String.Format( ! 'Invalid boolean value. Argument: {0}. Value: {1}', Matches, value)); ! end; ! end end; + {$ENDREGION} ! {$REGION 'CommandLine.CustomProcessingArgument'} ! constructor CommandLine.CustomProcessingArgument.Create(matches: string; caseSensitive: Boolean; instance: &Object; ! memberInfo: MemberInfo); ! begin ! inherited Create(matches, caseSensitive, instance, memberInfo); ! end; ! ! procedure CommandLine.CustomProcessingArgument.ProcessImpl(match, commandLine: string; var index: Integer); ! var ! params: array of &Object; ! begin ! params := ObjectArray.Create(match, commandLine, index); ! MethodInfo(MemberInfo).Invoke(Instance, params); ! index := Integer(params[2]); ! end; ! {$ENDREGION} ! ! {$REGION 'CommandLine.EnumArgument'} ! constructor CommandLine.EnumArgument.Create(matches: string; caseSensitive: Boolean; instance: &Object; ! memberInfo: MemberInfo); ! begin ! inherited Create(matches, caseSensitive, instance, memberInfo); ! end; ! ! procedure CommandLine.EnumArgument.ProcessImpl(match, commandLine: string; var index: Integer); var value: string; pi: PropertyInfo; begin value := Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index); ! pi := PropertyInfo(MemberInfo); pi.SetValue( ! Instance, ! System.Enum.Parse(pi.PropertyType, value, True), []); end; + {$ENDREGION} ! {$REGION 'CommandLine.IntegerArgument'} ! constructor CommandLine.IntegerArgument.Create(matches: string; caseSensitive: Boolean; instance: &Object; ! memberInfo: MemberInfo); begin ! inherited Create(matches, caseSensitive, instance, memberInfo); ! end; ! ! procedure CommandLine.IntegerArgument.ProcessImpl(match, commandLine: string; var index: Integer); ! var ! value: string; ! pi: PropertyInfo; ! begin ! value := Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index); ! pi := PropertyInfo(MemberInfo); ! pi.SetValue( ! Instance, ! pi.PropertyType.InvokeMember('Parse', BindingFlags.Static or BindingFlags.Public or BindingFlags.InvokeMethod, ! nil, Instance, [value, NumberFormatInfo.InvariantInfo], [], CultureInfo.InvariantCulture, ['s', 'provider']), ! []); ! end; ! {$ENDREGION} ! ! {$REGION 'CommandLine.StringArgument'} ! constructor CommandLine.StringArgument.Create(matches: string; caseSensitive: Boolean; instance: &Object; ! memberInfo: MemberInfo); ! begin ! inherited Create(matches, caseSensitive, instance, memberInfo); ! end; ! ! procedure CommandLine.StringArgument.ProcessImpl(match, commandLine: string; var index: Integer); ! begin ! PropertyInfo(MemberInfo).SetValue(Instance, Jedi.System.CommandLine.CommandLine.GetLiteral(commandLine, index), []); end; {$ENDREGION} |
From: Marcel B. <jed...@us...> - 2005-06-16 13:16:02
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30966/main/assemblies Modified Files: Jedi.System.bdsproj Jedi.System.dpk Log Message: Added scheduling framework Index: Jedi.System.dpk =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.System.dpk,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jedi.System.dpk 1 Mar 2005 14:25:51 -0000 1.6 --- Jedi.System.dpk 16 Jun 2005 13:15:48 -0000 1.7 *************** *** 36,40 **** Jedi.System.FrameworkResources in '..\run\Jedi.System.FrameworkResources.pas', Jedi.Timers.EventScheduler in '..\run\Jedi.Timers.EventScheduler.pas', ! Jedi.System.CommandLine in '..\run\Jedi.System.CommandLine.pas'; [assembly: AssemblyTitle('Jedi.System')] --- 36,41 ---- Jedi.System.FrameworkResources in '..\run\Jedi.System.FrameworkResources.pas', Jedi.Timers.EventScheduler in '..\run\Jedi.Timers.EventScheduler.pas', ! Jedi.System.CommandLine in '..\run\Jedi.System.CommandLine.pas', ! Jedi.Timers.Schedules in '..\run\Jedi.Timers.Schedules.pas'; [assembly: AssemblyTitle('Jedi.System')] Index: Jedi.System.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.System.bdsproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jedi.System.bdsproj 1 Mar 2005 14:25:51 -0000 1.6 --- Jedi.System.bdsproj 16 Jun 2005 13:15:48 -0000 1.7 *************** *** 1,3 **** ! <?xml version="1.0" encoding="utf-8"?> <BorlandProject> <PersonalityInfo> --- 1,3 ---- ! <?xml version="1.0" encoding="utf-8"?> <BorlandProject> <PersonalityInfo> *************** *** 171,175 **** </VersionInfoKeys> <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="Borland.Delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Collections.InlineEditable.pas" ContainerId="" ModuleName="Jedi.Collections.InlineEditable"/> --- 171,175 ---- </VersionInfoKeys> <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="Borland.Delphi" Version="9.0.1882.30496" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Collections.InlineEditable.pas" ContainerId="" ModuleName="Jedi.Collections.InlineEditable"/> *************** *** 180,183 **** --- 180,184 ---- <File FileName="..\run\Jedi.Timers.EventScheduler.pas" ContainerId="" ModuleName="Jedi.Timers.EventScheduler"/> <File FileName="..\run\Jedi.System.CommandLine.pas" ContainerId="" ModuleName="Jedi.System.CommandLine"/> + <File FileName="..\run\Jedi.Timers.Schedules.pas" ContainerId="" ModuleName="Jedi.Timers.Schedules"/> </FileList> </DelphiDotNet.Personality> |
From: Marcel B. <jed...@us...> - 2005-06-16 13:15:26
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30595/main/run Modified Files: Jedi.IO.IniFiles.pas Log Message: * Adapted to changes in ScheduledEvents Index: Jedi.IO.IniFiles.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.IO.IniFiles.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.IO.IniFiles.pas 29 Mar 2005 18:31:15 -0000 1.5 --- Jedi.IO.IniFiles.pas 16 Jun 2005 13:15:17 -0000 1.6 *************** *** 37,41 **** Jedi.System.SourceVersioning, Jedi.System.Strings, ! Jedi.Timers.EventScheduler; {$ENDREGION} --- 37,42 ---- Jedi.System.SourceVersioning, Jedi.System.Strings, ! Jedi.Timers.EventScheduler, ! Jedi.Timers.Schedules; {$ENDREGION} *************** *** 526,531 **** {$REGION 'Protected methods'} strict protected ! procedure AutoFlushHandler(event: ScheduledEvent); ! procedure AutoReloadHandler(event: ScheduledEvent); procedure FlushImpl; function NeedFlush: Boolean; --- 527,532 ---- {$REGION 'Protected methods'} strict protected ! procedure AutoFlushHandler(event: ScheduledEventBase); ! procedure AutoReloadHandler(event: ScheduledEventBase); procedure FlushImpl; function NeedFlush: Boolean; *************** *** 612,617 **** FPath := path; ReloadImpl(True); ! FAutoFlushEvent := ScheduledEvent.Create(0, AutoFlushHandler); ! FAutoReloadEvent := ScheduledEvent.Create(0, AutoReloadHandler); Self.AutoFlushInterval := autoFlushInterval; Self.AutoReloadInterval := autoReloadInterval; --- 613,618 ---- FPath := path; ReloadImpl(True); ! FAutoFlushEvent := ScheduledEvent.Create(nil, AutoFlushHandler); ! FAutoReloadEvent := ScheduledEvent.Create(nil, AutoReloadHandler); Self.AutoFlushInterval := autoFlushInterval; Self.AutoReloadInterval := autoReloadInterval; *************** *** 628,632 **** end; ! procedure BufferedIniFile.AutoFlushHandler(event: ScheduledEvent); begin Monitor.Enter(Self); --- 629,633 ---- end; ! procedure BufferedIniFile.AutoFlushHandler(event: ScheduledEventBase); begin Monitor.Enter(Self); *************** *** 639,643 **** end; ! procedure BufferedIniFile.AutoReloadHandler(event: ScheduledEvent); begin Monitor.Enter(Self); --- 640,644 ---- end; ! procedure BufferedIniFile.AutoReloadHandler(event: ScheduledEventBase); begin Monitor.Enter(Self); *************** *** 682,687 **** procedure BufferedIniFile.Dispose; begin ! FAutoReloadEvent.Interval := 0; ! FAutoFlushEvent.Interval := 0; if HasChanges then FlushImpl; --- 683,688 ---- procedure BufferedIniFile.Dispose; begin ! FAutoReloadEvent.Schedule := nil; ! FAutoFlushEvent.Schedule := nil; if HasChanges then FlushImpl; *************** *** 713,722 **** function BufferedIniFile.get_AutoFlushInterval: Integer; begin ! Result := FAutoFlushEvent.Interval div 10000; end; function BufferedIniFile.get_AutoReloadInterval: Integer; begin ! Result := FAutoReloadEvent.Interval div 10000; end; --- 714,723 ---- function BufferedIniFile.get_AutoFlushInterval: Integer; begin ! Result := MillisecondSchedule(FAutoFlushEvent.Schedule).Interval end; function BufferedIniFile.get_AutoReloadInterval: Integer; begin ! Result := MillisecondSchedule(FAutoReloadEvent.Schedule).Interval; end; *************** *** 808,812 **** raise ArgumentOutOfRangeException.Create('AutoFlushInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoFlushEvent.Interval := 10000 * value; end; --- 809,813 ---- raise ArgumentOutOfRangeException.Create('AutoFlushInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoFlushEvent.Schedule := MillisecondSchedule.Create(value); end; *************** *** 816,820 **** raise ArgumentOutOfRangeException.Create('AutoReloadInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoReloadEvent.Interval := 10000 * value; end; --- 817,821 ---- raise ArgumentOutOfRangeException.Create('AutoReloadInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoReloadEvent.Schedule := MillisecondSchedule.Create(value); end; |
From: Marcel B. <jed...@us...> - 2005-06-16 13:14:44
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30313/main/run Modified Files: Jedi.Timers.EventScheduler.pas Log Message: * ScheduledEvents now uses new Scheduling framework Index: Jedi.Timers.EventScheduler.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Timers.EventScheduler.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Timers.EventScheduler.pas 1 Mar 2005 14:22:59 -0000 1.2 --- Jedi.Timers.EventScheduler.pas 16 Jun 2005 13:14:36 -0000 1.3 *************** *** 26,69 **** interface ! {$REGION 'implementation uses'} uses System.Collections, System.Threading, ! Jedi.System.SourceVersioning; {$ENDREGION} ! {$REGION 'Scheduled event class'} type ! ScheduledEvent = class; ! [JediSourceInfo('$Header$')] ! ScheduledEventCallback = procedure(event: ScheduledEvent) of object; [JediSourceInfo('$Header$')] ! ScheduledEvent = class sealed (&Object) {$REGION 'Constructor'} ! public ! constructor Create(interval: Int64; callback: ScheduledEventCallback); {$ENDREGION} {$REGION 'Data'} strict private FCallback: ScheduledEventCallback; - FInterval: Int64; FScheduledFor: Int64; {$ENDREGION} ! {$REGION 'Internal methods'} ! strict private ! procedure Reschedule(fromNow: Boolean); protected ! procedure RunAndReschedule(state: &Object); {$ENDREGION} ! {$REGION 'Property access methods'} public ! procedure set_Interval(value: Int64); {$ENDREGION} {$REGION 'Properties'} public ! property Interval: Int64 read FInterval write set_Interval; ! property ScheduledFor: Int64 read FScheduledFor; {$ENDREGION} end; --- 26,111 ---- interface ! {$REGION 'uses'} uses System.Collections, System.Threading, ! Jedi.System.FrameworkResources, ! Jedi.System.SourceVersioning, ! Jedi.Timers.Schedules; {$ENDREGION} ! {$REGION 'Scheduled event base class and callback'} type ! ScheduledEventBase = class; [JediSourceInfo('$Header$')] ! ScheduledEventCallback = procedure(event: ScheduledEventBase) of object; [JediSourceInfo('$Header$')] ! ScheduledEventBase = class abstract (&Object) {$REGION 'Constructor'} ! strict protected ! constructor Create(callback: ScheduledEventCallback); {$ENDREGION} {$REGION 'Data'} strict private FCallback: ScheduledEventCallback; FScheduledFor: Int64; {$ENDREGION} ! {$REGION 'Adding/removing schedule from scheduler'} ! strict protected ! procedure AddSchedule; ! procedure RemoveSchedule; ! {$ENDREGION} ! {$REGION 'Abstract protected method'} ! strict protected ! function NextEvent: DateTime; virtual; abstract; ! {$ENDREGION} ! {$REGION 'Event raising and rescheduling'} ! strict protected ! procedure OnCallback; ! procedure ReScheduleFor(time: Int64); ! procedure Reschedule; virtual; protected ! procedure RunAndReschedule(state: &Object); virtual; {$ENDREGION} ! {$REGION 'Properties'} public ! property ScheduledFor: Int64 read FScheduledFor; ! {$ENDREGION} ! {$REGION 'Events'} ! public ! property Callback: ScheduledEventCallback add FCallback remove FCallback; ! {$ENDREGION} ! end; ! {$ENDREGION} ! ! {$REGION 'Scheduled event class'} ! type ! [JediSourceInfo('$Header$')] ! ScheduledEvent = class sealed (ScheduledEventBase) ! {$REGION 'Constructor'} ! public ! constructor Create(schedule: Jedi.Timers.Schedules.Schedule; callback: ScheduledEventCallback); ! {$ENDREGION} ! {$REGION 'Data'} ! strict private ! FSchedule: Jedi.Timers.Schedules.Schedule; ! FScheduleEnumerator: IEnumerator; ! {$ENDREGION} ! {$REGION 'Method overrides'} ! strict protected ! function NextEvent: DateTime; override; ! {$ENDREGION} ! {$REGION 'Protected methods'} ! strict protected ! procedure ScheduleChanged(sender: &Object; e: EventArgs); ! {$ENDREGION} ! {$REGION 'Property accessors'} ! public ! procedure set_Schedule(value: Jedi.Timers.Schedules.Schedule); {$ENDREGION} {$REGION 'Properties'} public ! property Schedule: Jedi.Timers.Schedules.Schedule read FSchedule write set_Schedule; {$ENDREGION} end; *************** *** 113,118 **** {$REGION 'Notification methods'} protected ! class procedure AddEvent(event: ScheduledEvent); static; ! class procedure RemoveEvent(event: ScheduledEvent); static; {$ENDREGION} end; --- 155,160 ---- {$REGION 'Notification methods'} protected ! class procedure AddEvent(event: ScheduledEventBase); static; ! class procedure RemoveEvent(event: ScheduledEventBase); static; {$ENDREGION} end; *************** *** 121,129 **** implementation - {$REGION 'implementation uses'} - uses - Jedi.System.FrameworkResources; - {$ENDREGION} - {$REGION 'protected types'} type --- 163,166 ---- *************** *** 131,139 **** NotificationInfo = record strict private ! FEvent: ScheduledEvent; FNotificationType: NotificationType; public ! constructor Create(notificationType: NotificationType; event: ScheduledEvent); ! property Event: ScheduledEvent read FEvent; property NotificationType: NotificationType read FNotificationType; end; --- 168,176 ---- NotificationInfo = record strict private ! FEvent: ScheduledEventBase; FNotificationType: NotificationType; public ! constructor Create(notificationType: NotificationType; event: ScheduledEventBase); ! property Event: ScheduledEventBase read FEvent; property NotificationType: NotificationType read FNotificationType; end; *************** *** 153,157 **** {$REGION 'NotificationInfo'} ! constructor NotificationInfo.Create(notificationType: NotificationType; event: ScheduledEvent); begin inherited Create; --- 190,194 ---- {$REGION 'NotificationInfo'} ! constructor NotificationInfo.Create(notificationType: NotificationType; event: ScheduledEventBase); begin inherited Create; *************** *** 162,183 **** {$REGION 'ScheduledEvent'} ! constructor ScheduledEvent.Create(interval: Int64; callback: ScheduledEventCallback); begin ! inherited Create; ! FCallback := callback; ! set_Interval(interval); end; ! procedure ScheduledEvent.Reschedule(fromNow: Boolean); begin Monitor.Enter(Self); try ! if Interval > 0 then begin ! if fromNow or (FScheduledFor = 0) then ! FScheduledFor := DateTime.UtcNow.Ticks + Interval else ! FScheduledFor := FScheduledFor + Interval; ! ScheduledEvents.AddEvent(Self); end; finally --- 199,252 ---- {$REGION 'ScheduledEvent'} ! constructor ScheduledEvent.Create(schedule: Jedi.Timers.Schedules.Schedule; callback: ScheduledEventCallback); begin ! inherited Create(callback); ! set_Schedule(schedule); end; ! function ScheduledEvent.NextEvent: DateTime; begin Monitor.Enter(Self); try ! if (FScheduleEnumerator <> nil) and FScheduleEnumerator.MoveNext then ! Result := DateTime(FScheduleEnumerator.Current) ! else ! Result := DateTime.MaxValue; ! finally ! Monitor.&Exit(Self); ! end; ! end; ! ! procedure ScheduledEvent.ScheduleChanged(sender: &Object; e: EventArgs); ! begin ! Monitor.Enter(Self); ! try ! FScheduleEnumerator := Schedule.GetEnumerator(DateTime.Now); ! FScheduleEnumerator.Reset; ! Reschedule; ! finally ! Monitor.&Exit(Self); ! end; ! end; ! ! procedure ScheduledEvent.set_Schedule(value: Jedi.Timers.Schedules.Schedule); ! begin ! Monitor.Enter(Self); ! try ! if value <> Schedule then begin ! RemoveSchedule; ! if Schedule <> nil then ! Exclude(Schedule.Changed, ScheduleChanged); ! FSchedule := value; ! if FSchedule <> nil then ! begin ! Include(Schedule.Changed, ScheduleChanged); ! FScheduleEnumerator := FSchedule.GetEnumerator(DateTime.Now); ! FScheduleEnumerator.Reset; ! Reschedule; ! end else ! FScheduleEnumerator := nil; end; finally *************** *** 185,213 **** end; end; ! procedure ScheduledEvent.RunAndReschedule(state: &Object); begin FCallback(Self); - Reschedule(False); end; ! procedure ScheduledEvent.set_Interval(value: Int64); begin Monitor.Enter(Self); try ! if value < 0 then ! raise ArgumentOutOfRangeException.Create('Interval', ! MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! if value <> Interval then begin ! FInterval := value; ! ScheduledEvents.RemoveEvent(Self); ! if value > 0 then ! Reschedule(True); end; finally Monitor.&Exit(Self); end; end; {$ENDREGION} --- 254,321 ---- end; end; + {$ENDREGION} ! {$REGION 'ScheduledEventBase'} ! constructor ScheduledEventBase.Create(callback: ScheduledEventCallback); ! begin ! inherited Create; ! FCallback := callback; ! end; ! ! procedure ScheduledEventBase.AddSchedule; ! begin ! ScheduledEvents.AddEvent(Self); ! end; ! ! procedure ScheduledEventBase.OnCallback; begin FCallback(Self); end; ! procedure ScheduledEventBase.RemoveSchedule; ! begin ! ScheduledEvents.RemoveEvent(Self); ! end; ! ! procedure ScheduledEventBase.Reschedule; ! var ! nxt: DateTime; ! // num: Integer; begin Monitor.Enter(Self); try ! nxt := NextEvent; ! // num := 0; ! while (nxt < DateTime.MaxValue) and (nxt <= DateTime.Now) do begin ! nxt := NextEvent; ! // Inc(num); end; + // if num > 0 then + // SignalMissed(num); + ReScheduleFor(nxt.Ticks); + finally + Monitor.&Exit(Self); + end; + end; + + procedure ScheduledEventBase.ReScheduleFor(time: Int64); + begin + Monitor.Enter(Self); + try + RemoveSchedule; + FScheduledFor := time; + if ScheduledFor < DateTime.MaxValue.Ticks then + AddSchedule; finally Monitor.&Exit(Self); end; end; + + procedure ScheduledEventBase.RunAndReschedule(state: &Object); + begin + OnCallback; + Reschedule; + end; {$ENDREGION} *************** *** 228,232 **** end; ! class procedure ScheduledEvents.AddEvent(event: ScheduledEvent); begin Monitor.Enter(FNotifications); --- 336,340 ---- end; ! class procedure ScheduledEvents.AddEvent(event: ScheduledEventBase); begin Monitor.Enter(FNotifications); *************** *** 270,274 **** end; ! class procedure ScheduledEvents.RemoveEvent(event: ScheduledEvent); begin Monitor.Enter(FNotifications); --- 378,382 ---- end; ! class procedure ScheduledEvents.RemoveEvent(event: ScheduledEventBase); begin Monitor.Enter(FNotifications); *************** *** 286,290 **** notified: Boolean; nowTicks: Int64; ! event: ScheduledEvent; begin FHasStarted := True; --- 394,398 ---- notified: Boolean; nowTicks: Int64; ! event: ScheduledEventBase; begin FHasStarted := True; *************** *** 294,298 **** if FEvents.Count > 0 then begin ! maxWait := ScheduledEvent(FEvents[0]).ScheduledFor - DateTime.UtcNow.Ticks; if maxWait < 0 then maxWait := 1; --- 402,406 ---- if FEvents.Count > 0 then begin ! maxWait := ScheduledEvent(FEvents[0]).ScheduledFor - DateTime.Now.Ticks; if maxWait < 0 then maxWait := 1; *************** *** 304,308 **** if notified then ProcessNotifications; ! nowTicks := DateTime.UtcNow.Ticks; Inc(FEventTriggerChecks); while (FEvents.Count > 0) and (ScheduledEvent(FEvents[0]).ScheduledFor <= nowTicks) do --- 412,416 ---- if notified then ProcessNotifications; ! nowTicks := DateTime.Now.Ticks; Inc(FEventTriggerChecks); while (FEvents.Count > 0) and (ScheduledEvent(FEvents[0]).ScheduledFor <= nowTicks) do |
From: Marcel B. <jed...@us...> - 2005-06-16 13:14:05
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29909/main/run Added Files: Jedi.Timers.Schedules.pas Log Message: New addition: scheduling support --- NEW FILE: Jedi.Timers.Schedules.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Timers.Schedules.pas, released on --. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet [...1665 lines suppressed...] FStart := value; Modified; end; end; procedure YearSchedule.set_Stop(value: Integer); begin if (value < 1) or (value > 9999) then raise ArgumentOutOfRangeException.Create('value', 'Out of range'); if value < FStart then set_Start(value); if value <> FStop then begin FStop := value; Modified; end; end; {$ENDREGION} end. |
From: Andreas H. <ah...@us...> - 2005-05-12 14:56:46
|
Update of /cvsroot/jedidotnet/dev/ahuser/WinFormsVCL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19210/ahuser/WinFormsVCL Modified Files: Jedi.WinForms.VCL.Buttons.pas Jedi.WinForms.VCL.Controls.pas Jedi.WinForms.VCL.Forms.pas Jedi.WinForms.VCL.Graphics.pas Jedi.WinForms.VCL.ImgList.pas Jedi.WinForms.VCL.Menus.pas Log Message: Fixed virtual constructor call Fixed empty bitmap.canvas Added DrawButtonFace Index: Jedi.WinForms.VCL.Buttons.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/ahuser/WinFormsVCL/Jedi.WinForms.VCL.Buttons.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.WinForms.VCL.Buttons.pas 26 Dec 2004 15:58:41 -0000 1.1 --- Jedi.WinForms.VCL.Buttons.pas 12 May 2005 14:56:37 -0000 1.2 *************** *** 30,37 **** uses System.Drawing, System.Windows.Forms, ! Borland.Vcl.Classes, Borland.Vcl.Messages, Jedi.WinForms.VCL.Controls, Jedi.WinForms.VCL.Graphics; type { Quick & Dirty, simply uses a WinForms Button which has too many features for a TSpeedButton like "Focus". } --- 30,39 ---- uses System.Drawing, System.Windows.Forms, ! Borland.Vcl.Types, Borland.Vcl.Classes, Jedi.WinForms.VCL.Controls, Jedi.WinForms.VCL.Graphics; type + TButtonStyle = (bsAutoDetect, bsWin31, bsNew); + { Quick & Dirty, simply uses a WinForms Button which has too many features for a TSpeedButton like "Focus". } *************** *** 69,74 **** --- 71,101 ---- end; + function DrawButtonFace(Canvas: TCanvas; const Client: TRect; + BevelWidth: Integer; Style: TButtonStyle; IsRounded, IsDown, + IsFocused: Boolean): TRect; + implementation + function DrawButtonFace(Canvas: TCanvas; const Client: TRect; + BevelWidth: Integer; Style: TButtonStyle; IsRounded, IsDown, + IsFocused: Boolean): TRect; + var + State: ButtonState; + begin + Result := Client; + OffsetRect(Result, -1, 0); + + State := ButtonState.Normal; + if IsDown then + State := ButtonState.Pushed; + if IsFocused then + State := State or ButtonState.Checked; + ControlPaint.DrawButton(Canvas.Handle, ToNETRectangle(Result), State); + Dec(Result.Right); + Dec(Result.Bottom); + if Style = bsWin31 then + Canvas.Handle.DrawRectangle(Pen.Create(Color.Black), ToNETRectangle(Result)); + end; + { TSpeedButton } Index: Jedi.WinForms.VCL.Graphics.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/ahuser/WinFormsVCL/Jedi.WinForms.VCL.Graphics.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.WinForms.VCL.Graphics.pas 26 Dec 2004 15:58:41 -0000 1.1 --- Jedi.WinForms.VCL.Graphics.pas 12 May 2005 14:56:37 -0000 1.2 *************** *** 57,60 **** --- 57,61 ---- clBlack = $00000000; clRed = $000000FF; + clBlue = $00FF0000; clWhite = $00FFFFFF; clBtnFace = clSystemColor or $00000001; *************** *** 248,251 **** --- 249,256 ---- TBitmap = class(TGraphic) + strict private + class var + FEmptyBitmap: TBitmap; + class function GetEmptyBitmap: TBitmap; static; private FHandle: System.Drawing.Bitmap; *************** *** 534,539 **** if Value <> FHandle then begin ! if FHandle <> nil then ! FHandle.Free; // dispose FHandle := Value; end; --- 539,544 ---- if Value <> FHandle then begin ! if Assigned(FHandle) then ! FHandle.Dispose; FHandle := Value; end; *************** *** 604,608 **** else begin ! raise Exception.Create('Source Canvas not supported. Must be a associated with an image/bitmap.'); (* dstDC := Handle.GetHdc; --- 609,613 ---- else begin ! raise Exception.Create('Source Canvas not supported. Must be associated with an image/bitmap.'); (* dstDC := Handle.GetHdc; *************** *** 810,814 **** finally Handle.Clip := ClipRegion; ! TextClip.Free; // dispose end; finally --- 815,819 ---- finally Handle.Clip := ClipRegion; ! TextClip.Dispose; end; finally *************** *** 852,856 **** Result := FromNETColor(Bmp.GetPixel(0, 0)); finally ! Bmp.Free; // dispose end; end; --- 857,861 ---- Result := FromNETColor(Bmp.GetPixel(0, 0)); finally ! Bmp.Dispose; end; end; *************** *** 866,870 **** Handle.DrawLine(P, X, Y, X, Y); finally ! P.Free; // dispose end; finally --- 871,875 ---- Handle.DrawLine(P, X, Y, X, Y); finally ! P.Dispose; end; finally *************** *** 889,893 **** begin if HandleAllocated then ! ImageHandle.Free; // dispose inherited Destroy; end; --- 894,898 ---- begin if HandleAllocated then ! ImageHandle.Dispose; // dispose inherited Destroy; end; *************** *** 962,966 **** end; end; ! FHandle.Free; FHandle := NewHandle; end; --- 967,972 ---- end; end; ! if Assigned(FHandle) then ! FHandle.Dispose; FHandle := NewHandle; end; *************** *** 1008,1017 **** Graphics.FillRectangle(Canvas.Brush.Handle, 0, Handle.Height, FWidth, FHeight - Handle.Height); finally ! Graphics.Free; end; end; InternalSetHandle(NewImg); if not KeepImage then Graphics.FillRectangle(Canvas.Brush.Handle, 0, 0, FWidth, FHeight); end else --- 1014,1027 ---- Graphics.FillRectangle(Canvas.Brush.Handle, 0, Handle.Height, FWidth, FHeight - Handle.Height); finally ! Graphics.Dispose; end; end; InternalSetHandle(NewImg); if not KeepImage then + begin + Graphics := System.Drawing.Graphics.FromImage(NewImg); Graphics.FillRectangle(Canvas.Brush.Handle, 0, 0, FWidth, FHeight); + Graphics.Dispose; + end; end else *************** *** 1056,1059 **** --- 1066,1074 ---- FCanvas.Handle := Graphics.FromImage(Handle); FCanvas.AssignedObject := Handle; + end + else + begin + Result := GetEmptyBitmap.Canvas; + Exit; end; end *************** *** 1061,1065 **** if Empty then begin ! FCanvas.Free; // dispose FCanvas := nil; end; --- 1076,1080 ---- if Empty then begin ! FCanvas.Free; FCanvas := nil; end; *************** *** 1167,1171 **** InternalSetHandle(Bmp); finally ! Graphics.Free; end; end; --- 1182,1186 ---- InternalSetHandle(Bmp); finally ! Graphics.Dispose; end; end; *************** *** 1183,1186 **** --- 1198,1212 ---- end; + class function TBitmap.GetEmptyBitmap: TBitmap; + begin + if not Assigned(FEmptyBitmap) then + begin + FEmptyBitmap := TBitmap.Create; + FEmptyBitmap.Width := 1; + FEmptyBitmap.Height := 1; + end; + Result := FEmptyBitmap; + end; + { TGraphicsObject } *************** *** 1206,1210 **** destructor TGraphicsObject.Destroy; begin ! FHandle.Free; // GDI objects need finalization inherited Destroy; end; --- 1232,1236 ---- destructor TGraphicsObject.Destroy; begin ! FHandle.Free; // GDI objects need finalization inherited Destroy; end; *************** *** 1385,1390 **** Changed; end; ! end; ! inherited Assign(Source); end; --- 1411,1417 ---- Changed; end; ! end ! else ! inherited Assign(Source); end; *************** *** 1497,1501 **** destructor TFont.Destroy; begin ! FBrush.Free; inherited Destroy; end; --- 1524,1528 ---- destructor TFont.Destroy; begin ! FBrush.Dispose; inherited Destroy; end; *************** *** 1523,1532 **** end else ! inherited Assign(Source); end; procedure TFont.Changed; begin ! FBrush.Free; FBrush := nil; inherited Changed; --- 1550,1560 ---- end else ! inherited Assign(Source); end; procedure TFont.Changed; begin ! if Assigned(FBrush) then ! FBrush.Dispose; FBrush := nil; inherited Changed; Index: Jedi.WinForms.VCL.Controls.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/ahuser/WinFormsVCL/Jedi.WinForms.VCL.Controls.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.WinForms.VCL.Controls.pas 26 Dec 2004 15:58:41 -0000 1.1 --- Jedi.WinForms.VCL.Controls.pas 12 May 2005 14:56:37 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- uses + System.Reflection, System.Drawing, System.Collections, System.ComponentModel, System.Windows.Forms, System.Windows.Forms.Design, *************** *** 77,81 **** --- 78,85 ---- procedure OnMouseUp(e: MouseEventArgs); override; procedure OnMouseDown(e: MouseEventArgs); override; + procedure OnVisibleChanged(e: EventArgs); override; protected + procedure DoShow; virtual; + procedure DoHide; virtual; procedure Click; virtual; procedure DblClick; virtual; *************** *** 84,92 **** procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); virtual; procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); virtual; - procedure DragDrop(Source: TObject; X, Y: Integer); virtual; procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); virtual; procedure WndProc(var Message: TMessage); virtual; public ! function Perform(Msg: Cardinal; WParam, LParam: Integer): Integer; end; --- 88,96 ---- procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); virtual; procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); virtual; procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); virtual; procedure WndProc(var Message: TMessage); virtual; public ! function Perform(Msg: Cardinal; WParam, LParam: Integer): Integer; ! procedure DragDrop(Source: TObject; X, Y: Integer); virtual; end; *************** *** 133,141 **** procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; property ControlStyle: TControlStyle read FControlStyle write SetControlStyle; property Caption: string read GetCaption write SetCaption; public function GetClientRect: TRect; --- 137,147 ---- procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); override; procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; + procedure DragCanceled; virtual; property ControlStyle: TControlStyle read FControlStyle write SetControlStyle; property Caption: string read GetCaption write SetCaption; + + class function Bounds(Left, Top, Width, Height: Integer): TRect; static; public function GetClientRect: TRect; *************** *** 145,153 **** class constructor Create; constructor Create(AOwner: TComponent); overload; virtual; ! constructor Create; overload; function ClientToScreen(const Pt: TPoint): TPoint; function ScreenToClient(const Pt: TPoint): TPoint; // Events property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown; --- 151,164 ---- class constructor Create; constructor Create(AOwner: TComponent); overload; virtual; ! constructor Create; overload; ! ! procedure DragDrop(Source: TObject; X, Y: Integer); override; function ClientToScreen(const Pt: TPoint): TPoint; function ScreenToClient(const Pt: TPoint): TPoint; + procedure Repaint; + procedure BeginDrag(Immediately: Boolean; Threshold: Integer = 0); + // Events property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown; *************** *** 205,208 **** --- 216,221 ---- function GetShiftState(Buttons: System.Windows.Forms.MouseButtons): TShiftState; + procedure InflateRect(var R: TRect; X, Y: Integer); + implementation *************** *** 235,238 **** --- 248,264 ---- end; + procedure InflateRect(var R: TRect; X, Y: Integer); + begin + R := Rect(R.Left + X, R.Top + Y, R.Right - X, R.Bottom - Y); + end; + + class function TWinControl.Bounds(Left, Top, Width, Height: Integer): TRect; + begin + Result.Left := Left; + Result.Top := Top; + Result.Right := Left + Width - 1; + Result.Bottom := Top + Height - 1; + end; + { TEventHelperControl } *************** *** 299,302 **** --- 325,329 ---- Resize; inherited OnResize(e); + Invalidate; end; *************** *** 374,377 **** --- 401,423 ---- end; + procedure TEventHelperControl.DoShow; + begin + + end; + + procedure TEventHelperControl.DoHide; + begin + + end; + + procedure TEventHelperControl.OnVisibleChanged(e: EventArgs); + begin + if Visible then + DoShow; + inherited OnVisibleChanged(e); + if not Visible then + DoHide; + end; + { TWinControl } *************** *** 382,387 **** constructor TWinControl.Create; begin ! Create(nil); end; --- 428,439 ---- constructor TWinControl.Create; + var + M: ConstructorInfo; begin ! inherited Create; ! FOwner := nil; ! M := GetType.GetConstructor(BindingFlags.InvokeMethod or BindingFlags.Instance or BindingFlags.&Public, nil, [TypeOf(TComponent)], nil); ! if Assigned(M) then ! M.Invoke(Self, [nil]); end; *************** *** 434,437 **** --- 486,494 ---- end; + procedure TWinControl.DragCanceled; + begin + DoDragDrop(Self, DragDropEffects.None); + end; + procedure TWinControl.SetAlign(const Value: TAlign); begin *************** *** 604,607 **** --- 661,674 ---- end; + procedure TWinControl.Repaint; + begin + Refresh; + end; + + procedure TWinControl.BeginDrag(Immediately: Boolean; Threshold: Integer); + begin + DoDragDrop(Self, DragDropEffects.All); + end; + { TCustomControl } |
From: Marcel B. <jed...@us...> - 2005-03-30 14:08:45
|
Update of /cvsroot/jedidotnet/tools/JediDoc/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4527/tools/JediDoc/source Modified Files: JediDoc.System.Console.pas JediDoc.System.Project.pas Log Message: Added project file support. Index: JediDoc.System.Console.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Console.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.System.Console.pas 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.System.Console.pas 30 Mar 2005 14:08:16 -0000 1.2 *************** *** 44,48 **** public type ! ExecutionTypes = (SaveProject = 0, Analyse = 1, UnitGeneration = 2, AssemblyGeneration = 4); {$ENDREGION} {$REGION 'Data'} --- 44,48 ---- public type ! ExecutionTypes = (None = 0, SaveProject = 1, Analyse = 2, UnitGeneration = 4, AssemblyGeneration = 8); {$ENDREGION} {$REGION 'Data'} *************** *** 51,56 **** class var FExecutionType: ExecutionTypes; class var FHelpShown: Boolean; - class var FProjectFile: string; class var FProjectContents: Project; class var FQuiet: Boolean; {$ENDREGION} --- 51,57 ---- class var FExecutionType: ExecutionTypes; class var FHelpShown: Boolean; class var FProjectContents: Project; + class var FSaveAsFileList: Boolean; + class var FSaveAsProject: string; class var FQuiet: Boolean; {$ENDREGION} *************** *** 86,94 **** class procedure ShowHelp; static; {$ENDREGION} {$REGION 'Properties'} public class property ExecutionType: ExecutionTypes read FExecutionType; class property ProjectContents: Project read FProjectContents; ! class property ProjectFile: string read FProjectFile; [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'q')] class property Quiet: Boolean read FQuiet write FQuiet; --- 87,109 ---- class procedure ShowHelp; static; {$ENDREGION} + {$REGION 'Property accessors'} + public + class procedure set_LoadedProject(value: string); static; + class procedure set_MergedProject(value: string); static; + class procedure set_SaveAsFileList(value: Boolean); static; + class procedure set_SaveAsProject(value: string); static; + {$ENDREGION} {$REGION 'Properties'} public class property ExecutionType: ExecutionTypes read FExecutionType; class property ProjectContents: Project read FProjectContents; ! [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'l', Name = 'load', ValueSeparator = ':')] ! class property LoadedProject: string write set_LoadedProject; ! [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'm', Name = 'merge', ValueSeparator = ':')] ! class property MergedProject: string write set_MergedProject; ! [CommandLineArgument(CaseSensitive = False, Prefix = '--', Name = 's', Name = 'save', ValueSeparator = ':')] ! class property SaveAsProject: string read FSaveAsProject write set_SaveAsProject; ! [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'sf', Name = 'saveas-filelist')] ! class property SaveAsFileList: Boolean read FSaveAsFileList write set_SaveAsFileList; [CommandLineArgument(CaseSensitive = False, Prefix = '-', Name = 'q')] class property Quiet: Boolean read FQuiet write FQuiet; *************** *** 148,151 **** --- 163,189 ---- end; + class procedure Settings.set_LoadedProject(value: string); + begin + ProjectContents.Load(value); + end; + + class procedure Settings.set_MergedProject(value: string); + begin + ProjectContents.Merge(value); + end; + + class procedure Settings.set_SaveAsFileList(value: Boolean); + begin + FArgumentDetected := True; + FSaveAsFileList := value; + end; + + class procedure Settings.set_SaveAsProject(value: string); + begin + FArgumentDetected := True; + FSaveAsProject := value; + FExecutionType := FExecutionType or ExecutionTypes.SaveProject; + end; + class procedure Settings.set_UnitGeneration(value: Boolean); begin *************** *** 172,190 **** try notSwitches := CommandLine.Parse([TypeOf(Settings), FProjectContents.Assemblies, FProjectContents.XmlFiles], '@'); ! if &Array(notSwitches).Length > 1 then begin Console.WriteLine('ERROR: Commandline parsing error:'); ! Console.WriteLine('More than project filename specified.'); Halt(100); end; ! if &Array(notSwitches).Length = 1 then ! FProjectFile := notSwitches[0]; ! if ArgumentDetected and not HelpShown and (ExecutionType = ExecutionTypes.SaveProject) and (ProjectFile = '') then begin Console.WriteLine('ERROR: Commandline parsing error:'); ! Console.WriteLine('No project filename specified to save to.'); Halt(100); end; ! //TODO: loading project file if one was specified. except on e: CommandLineException do --- 210,227 ---- try notSwitches := CommandLine.Parse([TypeOf(Settings), FProjectContents.Assemblies, FProjectContents.XmlFiles], '@'); ! if &Array(notSwitches).Length > 0 then begin Console.WriteLine('ERROR: Commandline parsing error:'); ! Console.WriteLine('Non switches provided.'); Halt(100); end; ! if not HelpShown and ArgumentDetected and (ExecutionType = ExecutionTypes.None) then begin Console.WriteLine('ERROR: Commandline parsing error:'); ! Console.WriteLine('No command specified.'); Halt(100); end; ! ProjectContents.Assemblies.Normalize; ! ProjectContents.XmlFiles.Normalize; except on e: CommandLineException do *************** *** 201,207 **** class procedure Settings.ShowHelp; begin ! Console.Write('Usage: '); Console.Write(Path.GetFileNameWithoutExtension(Process.GetCurrentProcess.MainModule.ModuleName)); ! Console.WriteLine(' [options] project'); Console.WriteLine; Console.WriteLine('Valid options:'); --- 238,249 ---- class procedure Settings.ShowHelp; begin ! Console.WriteLine('Usage: '); ! Console.Write(' '); Console.Write(Path.GetFileNameWithoutExtension(Process.GetCurrentProcess.MainModule.ModuleName)); ! Console.WriteLine(' [options] <command>'); ! Console.WriteLine('or:'); ! Console.Write(' '); ! Console.Write(Path.GetFileNameWithoutExtension(Process.GetCurrentProcess.MainModule.ModuleName)); ! Console.WriteLine(' @<path of file containing command line arguments>'); Console.WriteLine; Console.WriteLine('Valid options:'); *************** *** 209,242 **** Console.WriteLine(' -a[ssemblypath]:<path of assembly/assemblies>'); Console.WriteLine(' Adds the specified assembly or assemblies to the project. You can use'); ! Console.WriteLine(' wild-cards in the file name.'); Console.WriteLine(' -x[mlpath]:<path of xml file/files>'); Console.WriteLine(' Adds the specified xml file or files to the project. You can use wild-'); ! Console.WriteLine(' cards in the file name.'); ! Console.WriteLine(' -q'); ! Console.WriteLine(' Use quiet mode (no output other than errors and warnings).'); Console.WriteLine(' /? or --help'); Console.WriteLine(' Show this help page (also shown when no arguments were specified).'); Console.WriteLine(' --analyse'); Console.WriteLine(' Analyses the project for mismatches in documentation/assemblies.'); Console.WriteLine(' Will always result in output, regardless of -q option.'); - Console.WriteLine(' --generate:unitdocs'); - Console.WriteLine(' Generates/updates unit based XML files from the parsed assemblies.'); Console.WriteLine(' --generate:assemblydocs'); Console.WriteLine(' Generates/updates assembly based XML files from the parsed assemblies and'); Console.WriteLine(' xml files. <include> tags will be processed.'); Console.WriteLine; Console.WriteLine('Notes:'); - Console.WriteLine(' The -a and -x options affect the default project. When a project file name is'); - Console.WriteLine(' specified, those settings will be ignored.'); - Console.WriteLine; - Console.WriteLine(' If neither the analyse nor either of the generate options were specified, the'); - Console.WriteLine(' default project as build through the -a and -x options will be saved as the'); - Console.WriteLine(' specified project file (if no file name is specied an error message is'); - Console.WriteLine(' displayed).'); - Console.WriteLine; Console.WriteLine(' Instead of specifying everything on the command line, you can put all'); Console.WriteLine(' arguments in a file and use that file through the @<file> option. You can'); Console.WriteLine(' freely mix the usage of response files and arguments.'); Console.WriteLine; end; {$ENDREGION} --- 251,298 ---- Console.WriteLine(' -a[ssemblypath]:<path of assembly/assemblies>'); Console.WriteLine(' Adds the specified assembly or assemblies to the project. You can use'); ! Console.WriteLine(' wild-cards in the file name. Multiple occurances are allowed.'); ! Console.WriteLine(' -l[oad]:<path of JediDoc project file>'); ! Console.WriteLine(' Loads the specified project file. Existing project information is cleared'); ! Console.WriteLine(' prior to loading the file. Multiple occurances are allowed.'); ! Console.WriteLine(' -m[erge]:<path of JediDoc project file>'); ! Console.WriteLine(' Loads the specified project file. Existing project information is'); ! Console.WriteLine(' preserved. Multiple occurances are allowed.'); ! Console.WriteLine(' -q[+|-]'); ! Console.WriteLine(' Use quiet mode (no output other than errors and warnings). Without'); ! Console.WriteLine(' specifying a + or -, the switch toggles the current setting; + activates'); ! Console.WriteLine(' it regardless of current setting. Likewise, - deactivates the setting.'); ! Console.WriteLine(' -sf[+|-] or -saveas-filelist[+|-]'); ! Console.WriteLine(' Specifies the project is saved using actual files found, not the specified'); ! Console.WriteLine(' search masks. Only used in combination with the --save command. Without'); ! Console.WriteLine(' specifying a + or -, the switch toggles the current setting; + activates'); ! Console.WriteLine(' it regardless of current setting. Likewise, - deactivates the setting.'); Console.WriteLine(' -x[mlpath]:<path of xml file/files>'); Console.WriteLine(' Adds the specified xml file or files to the project. You can use wild-'); ! Console.WriteLine(' cards in the file name. Multiple occurances are allowed.'); Console.WriteLine(' /? or --help'); Console.WriteLine(' Show this help page (also shown when no arguments were specified).'); + Console.WriteLine; + Console.WriteLine('Valid commands:'); + Console.WriteLine; Console.WriteLine(' --analyse'); Console.WriteLine(' Analyses the project for mismatches in documentation/assemblies.'); Console.WriteLine(' Will always result in output, regardless of -q option.'); Console.WriteLine(' --generate:assemblydocs'); Console.WriteLine(' Generates/updates assembly based XML files from the parsed assemblies and'); Console.WriteLine(' xml files. <include> tags will be processed.'); + Console.WriteLine(' --generate:unitdocs'); + Console.WriteLine(' Generates/updates unit based XML files from the parsed assemblies.'); + Console.WriteLine(' --s[ave]:<path for new JediDoc project file>'); + Console.WriteLine(' Saves the current project to the specified file. If the file exists, it'); + Console.WriteLine(' will be overwritten without warning.'); Console.WriteLine; Console.WriteLine('Notes:'); Console.WriteLine(' Instead of specifying everything on the command line, you can put all'); Console.WriteLine(' arguments in a file and use that file through the @<file> option. You can'); Console.WriteLine(' freely mix the usage of response files and arguments.'); Console.WriteLine; + Console.WriteLine(' You should specify at least 1 command. A project needs at least one assembly'); + Console.WriteLine(' and one xml file to work.'); + Console.WriteLine; end; {$ENDREGION} Index: JediDoc.System.Project.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/source/JediDoc.System.Project.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.System.Project.pas 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.System.Project.pas 30 Mar 2005 14:08:16 -0000 1.2 *************** *** 30,35 **** Jedi.System.CommandLine, Jedi.Collections.InlineEditable, System.Collections, ! System.IO; {$ENDREGION} --- 30,42 ---- Jedi.System.CommandLine, Jedi.Collections.InlineEditable, + Jedi.IO.Paths, System.Collections, ! System.IO, ! System.Xml; ! {$ENDREGION} ! ! {$REGION 'Helper types'} ! type ! StringArray = array of string; {$ENDREGION} *************** *** 47,54 **** {$REGION 'Constructor'} strict protected ! constructor Create; {$ENDREGION} {$REGION 'Property accessors'} public function get_Items(index: Integer): string; procedure set_Items(index: Integer; value: string); --- 54,66 ---- {$REGION 'Constructor'} strict protected ! constructor Create(project: Project); ! {$ENDREGION} ! {$REGION 'Data'} ! strict private ! FProject: Project; {$ENDREGION} {$REGION 'Property accessors'} public + function get_Files: ICollection; function get_Items(index: Integer): string; procedure set_Items(index: Integer; value: string); *************** *** 57,65 **** public property Count: Integer read get_Count; property Items[&index: Integer]: string read get_Items write set_Items; default; {$ENDREGION} {$REGION 'Public methods'} public ! function GetFileEnumerator: IEnumerator; {$ENDREGION} end; --- 69,81 ---- public property Count: Integer read get_Count; + property Files: ICollection read get_Files; property Items[&index: Integer]: string read get_Items write set_Items; default; {$ENDREGION} + strict private + function ProcessFileSpecs: IDictionary; {$REGION 'Public methods'} public ! procedure Add(filename: string); ! procedure Normalize; {$ENDREGION} end; *************** *** 71,75 **** {$REGION 'Constructor'} private ! constructor Create; {$ENDREGION} {$REGION 'Property accessors'} --- 87,91 ---- {$REGION 'Constructor'} private ! constructor Create(project: Project); {$ENDREGION} {$REGION 'Property accessors'} *************** *** 94,98 **** {$REGION 'Constructor'} private ! constructor Create; {$ENDREGION} {$REGION 'Property accessors'} --- 110,114 ---- {$REGION 'Constructor'} private ! constructor Create(project: Project); {$ENDREGION} {$REGION 'Property accessors'} *************** *** 113,123 **** --- 129,161 ---- strict private FAssemblies: AssemblyCollection; + FBasePath: string; FXmlFiles: XmlCollection; {$ENDREGION} + {$REGION 'Property accessors'} + public + function get_BasePath: string; + {$ENDREGION} {$REGION 'Properties'} published property Assemblies: AssemblyCollection read FAssemblies; + property BasePath: string read get_BasePath; property XmlFiles: XmlCollection read FXmlFiles; {$ENDREGION} + {$REGION 'Private methods'} + strict private + procedure AssertValidProjectFile(projectFile: XmlDocument); + function GetFileList(node: XmlNode; readPath: string): StringArray; + procedure LoadImpl(filename: string; clear: Boolean); + procedure ProcessAssembly(node: XmlNode; readPath: string); + procedure ProcessSlashDoc(node: XmlNode; readPath: string); + procedure SaveFileList(files: FileCollection; filesElement: XmlElement; elementName, savePath: string; + actualFiles: Boolean); + {$ENDREGION} + {$REGION 'Public methods'} + public + procedure Load(filename: string); + procedure Merge(filename: string); + procedure Save(filename: string; actualFiles: Boolean); + {$ENDREGION} end; {$ENDREGION} *************** *** 129,141 **** begin inherited Create; ! FAssemblies := Project.AssemblyCollection.Create; ! FXmlFiles := Project.XmlCollection.Create; end; {$ENDREGION} {$REGION 'Project.AssemblyCollection'} ! constructor Project.AssemblyCollection.Create; begin ! inherited Create; end; --- 167,322 ---- begin inherited Create; ! FAssemblies := Project.AssemblyCollection.Create(Self); ! FXmlFiles := Project.XmlCollection.Create(Self); ! end; ! ! procedure Project.AssertValidProjectFile(projectFile: XmlDocument); ! var ! versionAttribute: XmlAttribute; ! begin ! // TODO: checks to make sure it's a valid file ! if projectFile.DocumentElement.Name <> 'jedidoc' then ! raise Exception.Create('Invalid JediDoc project file: no <jedidoc> element.'); ! versionAttribute := projectFile.DocumentElement.Attributes['version']; ! if versionAttribute = nil then ! raise Exception.Create('Invalid JediDoc project file: missing ''version'' attribute.'); ! if versionAttribute.Value <> '1.0' then ! raise Exception.Create(System.String.Format('Invalid JediDoc project file: invalid version "{0}".', ! versionAttribute.Value)); ! end; ! ! function Project.GetFileList(node: XmlNode; readPath: string): StringArray; ! var ! fileList: ArrayList; ! attrNode: XmlAttribute; ! begin ! fileList := ArrayList.Create; ! attrNode := node.Attributes['path']; ! if attrNode <> nil then ! fileList.Add(Jedi.IO.Paths.Path.Combine(readPath, attrNode.Value)); ! Result := StringArray(fileList.ToArray(TypeOf(string))); ! end; ! ! function Project.get_BasePath: string; ! begin ! if FBasePath = '' then ! FBasePath := Environment.CurrentDirectory; ! Result := FBasePath; ! end; ! ! procedure Project.Load(filename: string); ! begin ! LoadImpl(filename, True); ! end; ! ! procedure Project.LoadImpl(filename: string; clear: Boolean); ! var ! basePath: string; ! projectFile: XmlDocument; ! filesNode: XmlNode; ! assemblyNode: XmlNode; ! slashDocNode: XmlNode; ! begin ! filename := Path.GetFullPath(filename); ! projectFile := XmlDocument.Create; ! projectFile.PreserveWhitespace := False; ! projectFile.Load(filename); ! AssertValidProjectFile(projectFile); ! if clear then ! begin ! Assemblies.Clear; ! XmlFiles.Clear; ! FBasePath := ''; ! end; ! basePath := Path.GetDirectoryName(filename); ! if FBasePath = '' then ! FBasePath := basePath; ! for filesNode in projectFile.DocumentElement.SelectNodes('files') do ! begin ! for assemblyNode in filesNode.SelectNodes('assembly') do ! ProcessAssembly(assemblyNode, basePath); ! for slashDocNode in filesNode.SelectNodes('slashdoc') do ! ProcessSlashDoc(slashDocNode, basePath); ! end; ! end; ! ! procedure Project.Merge(filename: string); ! begin ! LoadImpl(filename, False); ! end; ! ! procedure Project.ProcessAssembly(node: XmlNode; readPath: string); ! var ! filename: string; ! begin ! for filename in GetFileList(node, readPath) do ! Assemblies.Add(Jedi.IO.Paths.Path.MakeRelativeFrom(filename, BasePath)); ! end; ! ! procedure Project.ProcessSlashDoc(node: XmlNode; readPath: string); ! var ! filename: string; ! begin ! for filename in GetFileList(node, readPath) do ! XmlFiles.Add(Jedi.IO.Paths.Path.MakeRelativeFrom(filename, BasePath)); ! end; ! ! procedure Project.Save(filename: string; actualFiles: Boolean); ! var ! xmlDoc: XmlDocument; ! projectElement: XmlElement; ! projVerAttribute: XmlAttribute; ! filesElement: XmlElement; ! xmlFile: XmlWriter; ! begin ! filename := Path.GetFullPath(filename); ! xmlDoc := XmlDocument.Create; ! xmlDoc.AppendChild(xmlDoc.CreateXmlDeclaration('1.0', '', '')); ! projectElement := xmlDoc.CreateElement('jedidoc'); ! projVerAttribute := xmlDoc.CreateAttribute('version'); ! projVerAttribute.Value := '1.0'; ! projectElement.Attributes.Append(projVerAttribute); ! filesElement := XmlDoc.CreateElement('files'); ! SaveFileList(Assemblies, filesElement, 'assembly', Path.GetDirectoryName(filename), actualFiles); ! SaveFileList(XmlFiles, filesElement, 'slashdoc', Path.GetDirectoryName(filename), actualFiles); ! projectElement.AppendChild(filesElement); ! xmlDoc.AppendChild(projectElement); ! xmlFile := XmlTextWriter.Create(StreamWriter.Create(filename)); ! try ! XmlTextWriter(xmlFile).Formatting := Formatting.Indented; ! xmlDoc.WriteTo(xmlFile); ! finally ! xmlFile.Close; ! end; ! end; ! ! procedure Project.SaveFileList(files: FileCollection; filesElement: XmlElement; elementName, savePath: string; ! actualFiles: Boolean); ! var ! col: ICollection; ! fileSpec: string; ! fileElement: XmlElement; ! pathAttribute: XmlAttribute; ! begin ! files.Normalize; ! if actualFiles then ! col := files.Files ! else ! col := files; ! for fileSpec in col do ! begin ! fileElement := filesElement.OwnerDocument.CreateElement(elementName); ! pathAttribute := filesElement.OwnerDocument.CreateAttribute('path'); ! pathAttribute.Value := Jedi.IO.Paths.Path.MakeRelativeFrom(fileSpec, savePath); ! fileElement.Attributes.Append(pathAttribute); ! filesElement.AppendChild(fileElement); ! end; end; {$ENDREGION} {$REGION 'Project.AssemblyCollection'} ! constructor Project.AssemblyCollection.Create(project: Project); begin ! inherited Create(project); end; *************** *** 147,174 **** procedure Project.AssemblyCollection.set_AssemblyPath(value: string); begin ! List.Add(&Object(value)); end; {$ENDREGION} {$REGION 'Project.FileCollection'} ! constructor Project.FileCollection.Create; begin inherited Create; end; ! function Project.FileCollection.GetFileEnumerator: IEnumerator; ! var ! files: SortedList; ! objDef: string; ! objSrc: string; begin ! files := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); ! for objDef in List do ! begin ! for objSrc in &Directory.GetFiles(&Path.GetDirectoryName(objDef), &Path.GetFileName(objDef)) do ! if not files.Contains(objSrc) then ! files.Add(objSrc, objDef); ! end; ! Result := files.Keys.GetEnumerator; end; --- 328,350 ---- procedure Project.AssemblyCollection.set_AssemblyPath(value: string); begin ! Add(value); end; {$ENDREGION} {$REGION 'Project.FileCollection'} ! constructor Project.FileCollection.Create(project: Project); begin inherited Create; + FProject := project; end; ! procedure Project.FileCollection.Add(filename: string); begin ! List.Add(Jedi.IO.Paths.Path.Combine(FProject.BasePath, filename)); ! end; ! ! function Project.FileCollection.get_Files: ICollection; ! begin ! Result := ProcessFileSpecs.Keys; end; *************** *** 182,191 **** List[index] := &Object(value); end; {$ENDREGION} {$REGION 'Project.XmlCollection'} ! constructor Project.XmlCollection.Create; begin ! inherited Create; end; --- 358,398 ---- List[index] := &Object(value); end; + + procedure Project.FileCollection.Normalize; + var + files: IList; + specs: IDictionary; + objSpec: &Object; + begin + files := IList(ProcessFileSpecs.Values); + specs := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + for objSpec in files do + if not specs.Contains(objSpec) then + specs.Add(objSpec, nil); + List.Clear; + ArrayList.Adapter(List).AddRange(specs.Keys); + end; + + function Project.FileCollection.ProcessFileSpecs: IDictionary; + var + objSpec: &Object; + filespec: string; + filename: string; + begin + Result := SortedList.Create(CaseInsensitiveComparer.DefaultInvariant); + for objSpec in List do + begin + filespec := string(objSpec); + for filename in Directory.GetFiles(Path.GetDirectoryName(filespec), Path.GetFileName(filespec)) do + if not Result.Contains(&Object(filename)) then + Result.Add(&Object(filename), &Object(filespec)); + end; + end; {$ENDREGION} {$REGION 'Project.XmlCollection'} ! constructor Project.XmlCollection.Create(project: Project); begin ! inherited Create(project); end; *************** *** 197,201 **** procedure Project.XmlCollection.set_XmlPath(value: string); begin ! List.Add(&Object(value)); end; {$ENDREGION} --- 404,408 ---- procedure Project.XmlCollection.set_XmlPath(value: string); begin ! Add(value); end; {$ENDREGION} |
From: Marcel B. <jed...@us...> - 2005-03-30 14:08:43
|
Update of /cvsroot/jedidotnet/tools/JediDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4527/tools/JediDoc Modified Files: JediDoc.Console.dpr Log Message: Added project file support. Index: JediDoc.Console.dpr =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Console.dpr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Console.dpr 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Console.dpr 30 Mar 2005 14:08:14 -0000 1.2 *************** *** 71,75 **** Console.WriteLine('no'); ! Console.Write(' Unit-based docs? '); if Settings.ExecutionType and Settings.ExecutionTypes.UnitGeneration = Settings.ExecutionTypes.UnitGeneration then Console.WriteLine('yes') --- 71,75 ---- Console.WriteLine('no'); ! Console.Write(' Generate unit-based docs? '); if Settings.ExecutionType and Settings.ExecutionTypes.UnitGeneration = Settings.ExecutionTypes.UnitGeneration then Console.WriteLine('yes') *************** *** 77,81 **** Console.WriteLine('no'); ! Console.Write(' Assembly-based docs? '); if Settings.ExecutionType and Settings.ExecutionTypes.AssemblyGeneration = Settings.ExecutionTypes.AssemblyGeneration then --- 77,81 ---- Console.WriteLine('no'); ! Console.Write(' Generate assembly-based docs? '); if Settings.ExecutionType and Settings.ExecutionTypes.AssemblyGeneration = Settings.ExecutionTypes.AssemblyGeneration then *************** *** 84,87 **** --- 84,99 ---- Console.WriteLine('no'); + Console.Write(' Save project file? '); + if Settings.ExecutionType and Settings.ExecutionTypes.SaveProject = Settings.ExecutionTypes.SaveProject then + begin + Console.Write('yes'); + if Settings.SaveAsFileList then + Console.WriteLine(', complete file list.') + else + Console.WriteLine(', specified masks only.') + end + else + Console.WriteLine('no'); + Console.WriteLine; end; *************** *** 89,93 **** procedure ParseProject; var ! enum: IEnumerator; hasFile: Boolean; begin --- 101,105 ---- procedure ParseProject; var ! filename: string; hasFile: Boolean; begin *************** *** 95,106 **** if not Settings.Quiet then Console.WriteLine('Processing assemblies...'); - enum := Settings.ProjectContents.Assemblies.GetFileEnumerator; hasFile := False; ! while enum.MoveNext do begin hasFile := True; if not Settings.Quiet then ! Console.WriteLine(' ' + Path.GetFileNameWithoutExtension(string(enum.Current))); ! docs.ProcessAssembly(string(enum.Current)); end; if not hasFile then --- 107,117 ---- if not Settings.Quiet then Console.WriteLine('Processing assemblies...'); hasFile := False; ! for filename in Settings.ProjectContents.Assemblies.Files do begin hasFile := True; if not Settings.Quiet then ! Console.WriteLine(' ' + Path.GetFileNameWithoutExtension(filename)); ! docs.ProcessAssembly(filename); end; if not hasFile then *************** *** 109,124 **** Halt(50); end; ! assyPath := Path.GetDirectoryName(Settings.ProjectContents.Assemblies[0]); if not Settings.Quiet then Console.WriteLine('Processing xml files...'); - enum := Settings.ProjectContents.XmlFiles.GetFileEnumerator; hasFile := False; ! while enum.MoveNext do begin hasFile := True; if not Settings.Quiet then ! Console.WriteLine(' ' + Path.GetFileNameWithoutExtension(string(enum.Current))); ! XmlReflector.ProcessXml(string(enum.Current), docs); end; if not hasFile then --- 120,134 ---- Halt(50); end; ! assyPath := Path.GetDirectoryName(string(IList(Settings.ProjectContents.Assemblies.Files)[0])); if not Settings.Quiet then Console.WriteLine('Processing xml files...'); hasFile := False; ! for filename in Settings.ProjectContents.XmlFiles.Files do begin hasFile := True; if not Settings.Quiet then ! Console.WriteLine(' ' + Path.GetFileNameWithoutExtension(filename)); ! XmlReflector.ProcessXml(filename, docs); end; if not hasFile then *************** *** 127,131 **** Halt(50); end; ! xmlPath := Path.GetDirectoryName(Settings.ProjectContents.XmlFiles[0]); if not Settings.Quiet then --- 137,141 ---- Halt(50); end; ! xmlPath := Path.GetDirectoryName(string(IList(Settings.ProjectContents.XmlFiles.Files)[0])); if not Settings.Quiet then *************** *** 135,140 **** procedure SaveProject; begin ! Console.WriteLine('Project files are not yet supported.'); ! Halt(80); end; --- 145,151 ---- procedure SaveProject; begin ! if not Settings.Quiet then ! Console.WriteLine('Saving as project "{0}"...', Settings.SaveAsProject); ! Settings.ProjectContents.Save(Settings.SaveAsProject, Settings.SaveAsFileList); end; |
From: Marcel B. <jed...@us...> - 2005-03-30 14:08:03
|
Update of /cvsroot/jedidotnet/tools/JediDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3792/tools/JediDoc Modified Files: JediDoc.Console.bdsproj JediDoc.Core.bdsproj JediDoc.Tool.bdsproj JediDoc.Tool.dpk JediDoc.Xml.bdsproj JediDoc.Xml.dpk Log Message: Removed traces of alias trick Index: JediDoc.Console.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Console.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Console.bdsproj 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Console.bdsproj 30 Mar 2005 14:07:25 -0000 1.2 *************** *** 45,49 **** <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> --- 45,49 ---- <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> *************** *** 120,124 **** <Directories Name="PackageDLLOutputDir">..\bin</Directories> <Directories Name="PackageDCPOutputDir">..\bin</Directories> ! <Directories Name="SearchPath">$(BDS)\Lib;..\..\main\bin;..\bin;..\..\main\lib</Directories> <Directories Name="Packages">JediDoc.Xml;JediDoc.Tool;JediDoc.Core;JediDoc.Analysis</Directories> <Directories Name="Conditionals"></Directories> --- 120,124 ---- <Directories Name="PackageDLLOutputDir">..\bin</Directories> <Directories Name="PackageDCPOutputDir">..\bin</Directories> ! <Directories Name="SearchPath">$(BDS)\Lib;..\..\main\bin;..\bin</Directories> <Directories Name="Packages">JediDoc.Xml;JediDoc.Tool;JediDoc.Core;JediDoc.Analysis</Directories> <Directories Name="Conditionals"></Directories> *************** *** 157,165 **** <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> </VersionInfoKeys> <FileList> ! <File FileName="..\bin\JediDoc.Analysis.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Analysis" AssemblyName="JediDoc.Analysis" Version="1.0.1913.21697" LinkUnits="False"/> ! <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" Version="1.0.1913.21018" LinkUnits="False"/> <File FileName="..\bin\JediDoc.Tool.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Tool" AssemblyName="JediDoc.Tool" Version="1.0.1.0" LinkUnits="False"/> ! <File FileName="..\bin\JediDoc.Xml.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Xml" AssemblyName="JediDoc.Xml" Version="1.0.1913.21590" LinkUnits="False"/> <File FileName="" ContainerId="" ModuleName="JediDoc.System.Analysis"/> <File FileName="" ContainerId="" ModuleName="JediDoc.System.Console"/> --- 157,408 ---- <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> </VersionInfoKeys> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <FileList> ! <File FileName="..\bin\JediDoc.Analysis.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Analysis" AssemblyName="JediDoc.Analysis" Version="1.0.1.0" LinkUnits="False"/> ! <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" Version="1.0.1.0" LinkUnits="False"/> <File FileName="..\bin\JediDoc.Tool.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Tool" AssemblyName="JediDoc.Tool" Version="1.0.1.0" LinkUnits="False"/> ! <File FileName="..\bin\JediDoc.Xml.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Xml" AssemblyName="JediDoc.Xml" Version="1.0.1.0" LinkUnits="False"/> <File FileName="" ContainerId="" ModuleName="JediDoc.System.Analysis"/> <File FileName="" ContainerId="" ModuleName="JediDoc.System.Console"/> Index: JediDoc.Core.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Core.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Core.bdsproj 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Core.bdsproj 30 Mar 2005 14:07:26 -0000 1.2 *************** *** 45,49 **** <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> --- 45,49 ---- <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> Index: JediDoc.Tool.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Tool.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Tool.bdsproj 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Tool.bdsproj 30 Mar 2005 14:07:27 -0000 1.2 *************** *** 45,49 **** <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> --- 45,49 ---- <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> *************** *** 121,125 **** <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\..\main\bin</Directories> ! <Directories Name="Packages">Jedi.System;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> --- 121,125 ---- <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\..\main\bin</Directories> ! <Directories Name="Packages">Jedi.System;Jedi.IO;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> *************** *** 160,163 **** --- 160,164 ---- <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="..\..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> + <File FileName="..\..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="source\JediDoc.System.Project.pas" ContainerId="" ModuleName="JediDoc.System.Project"/> <File FileName="source\JediDoc.System.Console.pas" ContainerId="" ModuleName="JediDoc.System.Console"/> Index: JediDoc.Xml.dpk =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Xml.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Xml.dpk 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Xml.dpk 30 Mar 2005 14:07:27 -0000 1.2 *************** *** 27,32 **** requires Borland.Delphi, - JediDoc.Core, System.XML, Jedi.IO; --- 27,32 ---- requires Borland.Delphi, System.XML, + JediDoc.Core, Jedi.IO; Index: JediDoc.Xml.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Xml.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Xml.bdsproj 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Xml.bdsproj 30 Mar 2005 14:07:27 -0000 1.2 *************** *** 45,49 **** <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;Jedi.System=Jedi.System.Attributes, Jedi.System.Strings, Jedi.System.SourceVersioning;Jedi.Collections=Jedi.Collections.InlineEditable;Jedi.IO=Jedi.IO.FileOfRec, Jedi.IO.IniFiles, Jedi.IO.Paths</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> --- 45,49 ---- <Compiler Name="ShowHints">True</Compiler> <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> <Compiler Name="NamespacePrefix"></Compiler> <Compiler Name="GenerateDocumentation">False</Compiler> *************** *** 121,125 **** <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\bin;..\..\main\bin</Directories> ! <Directories Name="Packages">Jedi.IO;System.XML.dll;JediDoc.Core;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> --- 121,125 ---- <Directories Name="PackageDCPOutputDir">..\bin</Directories> <Directories Name="SearchPath">$(BDS)\Lib;..\bin;..\..\main\bin</Directories> ! <Directories Name="Packages">JediDoc.Core;System.XML.dll;Borland.Delphi</Directories> <Directories Name="Conditionals"></Directories> <Directories Name="DebugSourceDirs"></Directories> *************** *** 159,164 **** <FileList> <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> - <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" Version="1.0.1913.21018" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="source\JediDoc.System.Xml.Reflection.pas" ContainerId="" ModuleName="JediDoc.System.Xml.Reflection"/> --- 159,164 ---- <FileList> <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0" LinkUnits="False"/> + <File FileName="..\bin\JediDoc.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="JediDoc.Core" AssemblyName="JediDoc.Core" CopyLocal="True" Version="1.0.1.0" LinkUnits="False"/> <File FileName="..\..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="source\JediDoc.System.Xml.Reflection.pas" ContainerId="" ModuleName="JediDoc.System.Xml.Reflection"/> Index: JediDoc.Tool.dpk =================================================================== RCS file: /cvsroot/jedidotnet/tools/JediDoc/JediDoc.Tool.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JediDoc.Tool.dpk 28 Mar 2005 12:26:16 -0000 1.1 --- JediDoc.Tool.dpk 30 Mar 2005 14:07:27 -0000 1.2 *************** *** 27,31 **** requires Borland.Delphi, ! Jedi.System; contains --- 27,32 ---- requires Borland.Delphi, ! Jedi.System, ! Jedi.IO; contains |