[JEDI.NET-commits] main/run Jedi.Core.Resources.pas,NONE,1.1 Jedi.IO.Resources.pas,NONE,1.1 Jedi.Sys
Status: Pre-Alpha
Brought to you by:
jedi_mbe
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17540/main/run Modified Files: Jedi.Collections.InlineEditable.pas Jedi.Drawing.Colors.pas Jedi.IO.FileOfRec.pas Jedi.IO.IniFiles.pas Jedi.IO.Paths.pas Jedi.Math.Evaluation.Base.pas Jedi.System.Attributes.pas Jedi.System.CommandLine.pas Jedi.System.FrameworkResources.pas Jedi.System.SourceVersioning.pas Jedi.System.Strings.pas Jedi.Text.Tokenization.InputBase.pas Jedi.Text.Tokenization.ProviderBase.pas Jedi.Text.Tokenization.TokenBase.pas Jedi.Text.Tokenization.TokenizerBase.pas Jedi.Timers.EventScheduler.pas Jedi.Timers.Schedules.pas Added Files: Jedi.Core.Resources.pas Jedi.IO.Resources.pas Jedi.System.Resources.pas Jedi.Text.Resources.pas Jedi_Core_AssemblyInfo.pas Jedi_Drawing_AssemblyInfo.pas Jedi_IO_AssemblyInfo.pas Jedi_System_AssemblyInfo.pas Jedi_Text_AssemblyInfo.pas common_asm_attribs.inc Removed Files: Jedi.Math.Resources.pas Log Message: * Added resource classes per assembly * Added generic assembly info include file and an assembly info file per assembly * Adjusted sources to new resource files --- NEW FILE: Jedi_Core_AssemblyInfo.pas --- unit Jedi_Core_AssemblyInfo; interface uses System.Reflection, System.Runtime.InteropServices; [assembly: AssemblyTitle('Jedi.Core')] [assembly: AssemblyDescription('JEDI.NET Core Assembly')] {$I common_asm_attribs.inc} //[assembly: Guid('')] //[assembly: TypeLibVersion(1, 0)] implementation end. Index: Jedi.System.FrameworkResources.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.FrameworkResources.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.System.FrameworkResources.pas 14 Mar 2005 13:30:13 -0000 1.2 --- Jedi.System.FrameworkResources.pas 24 Dec 2005 12:25:13 -0000 1.3 *************** *** 26,30 **** interface ! {$REGION 'interface uses'} uses Jedi.System.SourceVersioning, --- 26,30 ---- interface ! {$REGION 'uses'} uses Jedi.System.SourceVersioning, *************** *** 40,44 **** {$REGION 'mscorlib resources'} type ! [JediSourceInfo('$Header$')] MscorlibResources = class sealed (&Object) {$REGION 'Constructors'} --- 40,47 ---- {$REGION 'mscorlib resources'} type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] MscorlibResources = class sealed (&Object) {$REGION 'Constructors'} *************** *** 52,56 **** class var rm: ResourceManager; {$ENDREGION} ! {$REGION 'String retrieval'} public class function GetResourceString(id: string): string; overload; static; --- 55,59 ---- class var rm: ResourceManager; {$ENDREGION} ! {$REGION 'Basic string retrieval'} public class function GetResourceString(id: string): string; overload; static; *************** *** 66,69 **** --- 69,159 ---- class function GetResourceString(culture: CultureInfo; id: string; args: ObjectArray): string; overload; static; {$ENDREGION} + {$REGION 'Exceptions: Argument-related exceptions'} + public + class function ArgumentMustBeNonNegative(arg: string): string; overload; static; + class function ArgumentMustBeNonNegative(culture: CultureInfo; arg: string): string; overload; static; + {$ENDREGION} + {$REGION 'Exceptions: Invalid operations'} + public + class function IComparerFailed: string; overload; static; + class function IComparerFailed(culture: CultureInfo): string; overload; static; + {$ENDREGION} + {$REGION 'Enumerators related resources'} + public + type + [JediSourceInfo( + '$Source$', + '$Revision$', + '$Date$')] + Enumerator = class abstract (&Object) + {$REGION 'Hidden constructor'} + strict protected + constructor Create; + {$ENDREGION} + {$REGION 'Exception messages'} + public + class function AlreadyEnded: string; overload; static; + class function AlreadyEnded(culture: CultureInfo): string; overload; static; + class function NotStarted: string; overload; static; + class function NotStarted(culture: CultureInfo): string; overload; static; + class function NoCurrentElement: string; overload; static; + class function NoCurrentElement(culture: CultureInfo): string; overload; static; + class function RemoveNotSupported: string; overload; static; + class function RemoveNotSupported(culture: CultureInfo): string; overload; static; + class function VersionFailed: string; overload; static; + class function VersionFailed(culture: CultureInfo): string; overload; static; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'Array related resources'} + public + type + [JediSourceInfo( + '$Source$', + '$Revision$', + '$Date$')] + Arrays = class abstract (&Object) + {$REGION 'Hidden constructor'} + strict protected + constructor Create; + {$ENDREGION} + {$REGION 'Exceptions'} + public + class function ArrayPlusOffsetTooSmall: string; overload; static; + class function ArrayPlusOffsetTooSmall(culture: CultureInfo): string; overload; static; + class function IndexOutOfRange: string; overload; static; + class function IndexOutOfRange(culture: CultureInfo): string; overload; static; + class function MultiDimensionalNotAllowed: string; overload; static; + class function MultiDimensionalNotAllowed(culture: CultureInfo): string; overload; static; + {$ENDREGION} + end; + {$ENDREGION} + {$REGION 'Collections related resources'} + public + type + [JediSourceInfo( + '$Source$', + '$Revision$', + '$Date$')] + Collections = class abstract (&Object) + {$REGION 'Hidden constructor'} + strict protected + constructor Create; + {$ENDREGION} + {$REGION 'Common strings'} + public + // Note: this one will be retrieved from the System assembly resource + class function CollectionConverterText: string; overload; static; + class function CollectionConverterText(culture: CultureInfo): string; overload; static; + {$ENDREGION} + {$REGION 'Exceptions'} + public + class function IsFixedSize: string; overload; static; + class function IsFixedSize(culture: CultureInfo): string; overload; static; + class function IsReadOnly: string; overload; static; + class function IsReadOnly(culture: CultureInfo): string; overload; static; + {$ENDREGION} + end; + {$ENDREGION} end; {$ENDREGION} *************** *** 71,75 **** {$REGION 'System resources'} type ! [JediSourceInfo('$Header$')] SystemResources = class sealed (&Object) {$REGION 'Constructors'} --- 161,168 ---- {$REGION 'System resources'} type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] SystemResources = class sealed (&Object) {$REGION 'Constructors'} *************** *** 113,116 **** --- 206,219 ---- end; + class function MscorlibResources.ArgumentMustBeNonNegative(arg: string): string; + begin + Result := ArgumentMustBeNonNegative(CultureInfo.CurrentCulture, arg); + end; + + class function MscorlibResources.ArgumentMustBeNonNegative(culture: CultureInfo; arg: string): string; + begin + Result := GetResourceString(culture, 'ArgumentOutOfRange_MustBeNonNegNum', arg); + end; + class function MscorlibResources.GetResourceString(id: string): string; begin *************** *** 162,165 **** --- 265,409 ---- Result := System.String.Format(GetResourceString(culture, id), args); end; + + class function MscorlibResources.IComparerFailed: string; + begin + Result := IComparerFailed(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.IComparerFailed(culture: CultureInfo): string; + begin + Result := GetResourceString(culture, 'InvalidOperation_IComparerFailed'); + end; + {$ENDREGION} + + {$REGION 'MscorlibResources.Arrays'} + constructor MscorlibResources.Arrays.Create; + begin + inherited Create; + end; + + class function MscorlibResources.Arrays.ArrayPlusOffsetTooSmall: string; + begin + Result := ArrayPlusOffsetTooSmall(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Arrays.ArrayPlusOffsetTooSmall(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'Arg_ArrayPlusOffTooSmall'); + end; + + class function MscorlibResources.Arrays.IndexOutOfRange: string; + begin + Result := IndexOutOfRange(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Arrays.IndexOutOfRange(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'Arg_IndexOutOfRangeException'); + end; + + class function MscorlibResources.Arrays.MultiDimensionalNotAllowed: string; + begin + Result := MultiDimensionalNotAllowed(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Arrays.MultiDimensionalNotAllowed(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'Arg_RankMultiDimNotSupported'); + end; + {$ENDREGION} + + {$REGION 'MscorlibResources.Collections'} + constructor MscorlibResources.Collections.Create; + begin + inherited Create; + end; + + class function MscorlibResources.Collections.CollectionConverterText: string; + begin + Result := CollectionConverterText(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Collections.CollectionConverterText(culture: CultureInfo): string; + begin + Result := SystemResources.GetResourceString(culture, 'CollectionConverterText'); + end; + + class function MscorlibResources.Collections.IsFixedSize: string; + begin + Result := IsFixedSize(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Collections.IsFixedSize(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'NotSupported_FixedSizeCollection'); + end; + + class function MscorlibResources.Collections.IsReadOnly: string; + begin + Result := IsReadOnly(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Collections.IsReadOnly(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'NotSupported_ReadOnlyCollection'); + end; + {$ENDREGION} + + {$REGION 'MscorlibResources.Enumerator'} + constructor MscorlibResources.Enumerator.Create; + begin + inherited Create; + end; + + class function MscorlibResources.Enumerator.AlreadyEnded: string; + begin + Result := AlreadyEnded(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Enumerator.AlreadyEnded(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'InvalidOperation_EnumEnded'); + end; + + class function MscorlibResources.Enumerator.NotStarted: string; + begin + Result := NotStarted(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Enumerator.NotStarted(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'InvalidOperation_EnumNotStarted'); + end; + + class function MscorlibResources.Enumerator.NoCurrentElement: string; + begin + Result := NoCurrentElement(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Enumerator.NoCurrentElement(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'InvalidOperation_EnumOpCantHappen'); + end; + + class function MscorlibResources.Enumerator.RemoveNotSupported: string; + begin + Result := RemoveNotSupported(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Enumerator.RemoveNotSupported(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'NotSupported_RemoveOnEnum'); + end; + + class function MscorlibResources.Enumerator.VersionFailed: string; + begin + Result := VersionFailed(CultureInfo.CurrentCulture); + end; + + class function MscorlibResources.Enumerator.VersionFailed(culture: CultureInfo): string; + begin + Result := MscorlibResources.GetResourceString(culture, 'InvalidOperation_EnumFailedVersion'); + end; {$ENDREGION} --- NEW FILE: Jedi.System.Resources.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.System.Resources.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 Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.System.Resources.pas,v 1.1 2005/12/24 12:25:13 jedi_mbe Exp $ unit Jedi.System.Resources; interface {$REGION 'uses'} uses Jedi.System.SourceVersioning, Jedi.Text.Tokenization.TokenBase, System.Globalization, System.Resources, System.Reflection; {$ENDREGION} {$REGION 'Helper types'} type ObjectArray = array of &Object; {$ENDREGION} {$REGION 'Jedi.System resources'} type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.System.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] Resources = class abstract (&Object) {$REGION 'Constructors'} strict private class constructor Create; strict protected constructor Create; {$ENDREGION} {$REGION 'Data'} strict private class var rm: ResourceManager; {$ENDREGION} {$REGION 'Basic string retrieval'} public class function GetResourceString(id: string): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string): string; overload; static; class function GetResourceString(id: string; arg0: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0: &Object): string; overload; static; class function GetResourceString(id: string; arg0, arg1: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0, arg1: &Object): string; overload; static; class function GetResourceString(id: string; arg0, arg1, arg2: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0, arg1, arg2: &Object): string; overload; static; class function GetResourceString(id: string; args: ObjectArray): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; args: ObjectArray): string; overload; static; {$ENDREGION} {$REGION 'Commandline processing related resources'} public type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.System.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] CommandLine = class abstract (&Object) {$REGION 'Hidden constructor'} strict protected constructor Create; {$ENDREGION} {$REGION 'Helper methods'} strict protected class function FullMemberName(mi: MemberInfo): string; static; {$ENDREGION} {$REGION 'Parser exception messages'} public class function DuplicateSwitch(switch: string; newMember, existingMember: MemberInfo): string; overload; static; class function DuplicateSwitch(switch: string; newMember, existingMember: MemberInfo; culture: CultureInfo): string; overload; static; class function FilenameRequired: string; overload; static; class function FilenameRequired(culture: CultureInfo): string; overload; static; class function InvalidHandlerAncestor: string; overload; static; class function InvalidHandlerAncestor(culture: CultureInfo): string; overload; static; class function InvalidValue(switch, value: string): string; overload; static; class function InvalidValue(switch, value: string; culture: CultureInfo): string; overload; static; class function InvalidHandlerCtor(handlerType: &Type): string; overload; static; class function InvalidHandlerCtor(handlerType: &Type; culture: CultureInfo): string; overload; static; class function MethodSignatureError: string; overload; static; class function MethodSignatureError(culture: CultureInfo): string; overload; static; class function NoHandlerFor(propertyType: &Type): string; overload; static; class function NoHandlerFor(propertyType: &Type; culture: CultureInfo): string; overload; static; class function SwitchMatchIsEmpty: string; overload; static; class function SwitchMatchIsEmpty(culture: CultureInfo): string; overload; static; class function UnknownSwitch(switch: string): string; overload; static; class function UnknownSwitch(switch: string; culture: CultureInfo): string; overload; static; class function ValueRequired(switch: string): string; overload; static; class function ValueRequired(switch: string; culture: CultureInfo): string; overload; static; {$ENDREGION} end; {$ENDREGION} {$REGION 'Math related resources'} public type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.System.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] Math = class abstract (&Object) {$REGION 'Hidden constructor'} strict protected constructor Create; {$ENDREGION} {$REGION 'Helper methods'} strict protected class function ParserExpectedMsg(culture: CultureInfo; currentToken: Token; expectedId: string; args: ObjectArray): string; static; {$ENDREGION} {$REGION 'Parser exception messages'} public class function ParserExpectedClosingParenthesis(currentToken, openParenthesis: Token): string; overload; static; class function ParserExpectedClosingParenthesis(culture: CultureInfo; currentToken, openParenthesis: Token): string; overload; static; class function ParserExpectedConditionalValueSeparator(currentToken: Token): string; overload; static; class function ParserExpectedConditionalValueSeparator(culture: CultureInfo; currentToken: Token): string; overload; static; class function ParserExpectedArgumentSeparator(currentToken: Token): string; overload; static; class function ParserExpectedArgumentSeparator(culture: CultureInfo; currentToken: Token): string; overload; static; class function ParserExpectedPrimary(currentToken: Token): string; overload; static; class function ParserExpectedPrimary(culture: CultureInfo; currentToken: Token): string; overload; static; class function ParserUnknownIdentifier(currentToken: Token): string; overload; static; class function ParserUnknownIdentifier(culture: CultureInfo; currentToken: Token): string; overload; static; {$ENDREGION} end; {$ENDREGION} end; {$ENDREGION} implementation {$AUTOBOX ON} uses Jedi.System.CommandLine; {$REGION 'Resources'} class constructor Resources.Create; begin rm := ResourceManager.Create('Jedi.System', TypeOf(Resources).Assembly); end; constructor Resources.Create; begin inherited Create; end; class function Resources.GetResourceString(id: string): string; begin Result := GetResourceString(CultureInfo.CurrentCulture, id); end; class function Resources.GetResourceString(culture: CultureInfo; id: string): string; begin Result := rm.GetString(id, culture); end; class function Resources.GetResourceString(id: string; arg0: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0); end; class function Resources.GetResourceString(id: string; arg0, arg1: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0, arg1); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0, arg1: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0, arg1); end; class function Resources.GetResourceString(id: string; arg0, arg1, arg2: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0, arg1, arg2); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0, arg1, arg2: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0, arg1, arg2); end; class function Resources.GetResourceString(id: string; args: array of &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), args); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; args: array of &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), args); end; {$ENDREGION} {$REGION 'Resources.CommandLine'} constructor Resources.CommandLine.Create; begin inherited Create; end; class function Resources.CommandLine.DuplicateSwitch(switch: string; newMember, existingMember: MemberInfo): string; begin Result := DuplicateSwitch(switch, newMember, existingMember, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.DuplicateSwitch(switch: string; newMember, existingMember: MemberInfo; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_DuplicateSwitch', switch, FullMemberName(newMember), FullMemberName(existingMember)); end; class function Resources.CommandLine.FilenameRequired: string; begin Result := FilenameRequired(CultureInfo.CurrentCulture); end; class function Resources.CommandLine.FilenameRequired(culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_ResponseFileNeedsFilename'); end; class function Resources.CommandLine.FullMemberName(mi: MemberInfo): string; begin Result := System.String.Format('{0}.{1}', mi.ReflectedType.FullName, mi.Name); end; class function Resources.CommandLine.InvalidHandlerAncestor: string; begin Result := InvalidhandlerAncestor(CultureInfo.CurrentCulture); end; class function Resources.CommandLine.InvalidHandlerAncestor(culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_InvalidHandlerAncestor', TypeOf( Jedi.System.CommandLine.CommandLine.Argument).FullName); end; class function Resources.CommandLine.InvalidValue(switch, value: string): string; begin Result := InvalidValue(switch, value, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.InvalidValue(switch, value: string; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_InvalidValueFor', switch, value); end; class function Resources.CommandLine.InvalidHandlerCtor(handlerType: &Type): string; begin Result := InvalidHandlerCtor(handlerType, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.InvalidHandlerCtor(handlerType: &Type; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_HandlerInvalidCtor', handlerType); end; class function Resources.CommandLine.MethodSignatureError: string; begin Result := MethodSignatureError(CultureInfo.CurrentCulture); end; class function Resources.CommandLine.MethodSignatureError(culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_MethSigError'); end; class function Resources.CommandLine.NoHandlerFor(propertyType: &Type): string; begin Result := NoHandlerFor(propertyType, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.NoHandlerFor(propertyType: &Type; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_NoHandlerForType', propertyType.FullName); end; class function Resources.CommandLine.SwitchMatchIsEmpty: string; begin Result := SwitchMatchIsEmpty(CultureInfo.CurrentCulture); end; class function Resources.CommandLine.SwitchMatchIsEmpty(culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_MatchIsEmpty'); end; class function Resources.CommandLine.UnknownSwitch(switch: string): string; begin Result := UnknownSwitch(switch, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.UnknownSwitch(switch: string; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_UnknownSwitch', switch); end; class function Resources.CommandLine.ValueRequired(switch: string): string; begin Result := ValueRequired(switch, CultureInfo.CurrentCulture); end; class function Resources.CommandLine.ValueRequired(switch: string; culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'cmd_ValueRequiredFor', switch); end; {$ENDREGION} {$REGION 'Resources.Math'} constructor Resources.Math.Create; begin inherited Create; end; class function Resources.Math.ParserExpectedClosingParenthesis(currentToken, openParenthesis: Token): string; begin Result := ParserExpectedClosingParenthesis(CultureInfo.CurrentCulture, currentToken, openParenthesis); end; class function Resources.Math.ParserExpectedClosingParenthesis(culture: CultureInfo; currentToken, openParenthesis: Token): string; begin Result := GetResourceString(culture, 'ParserExpBase', GetResourceString(culture, 'ParserExpClosePar', openParenthesis.Line, openParenthesis.Column), currentToken.Line, currentToken.Column) end; class function Resources.Math.ParserExpectedConditionalValueSeparator(currentToken: Token): string; begin Result := ParserExpectedConditionalValueSeparator(CultureInfo.CurrentCulture, currentToken); end; class function Resources.Math.ParserExpectedConditionalValueSeparator(culture: CultureInfo; currentToken: Token): string; begin Result := ParserExpectedMsg(culture, currentToken, 'ParserExpCondValueSep', nil); end; class function Resources.Math.ParserExpectedArgumentSeparator(currentToken: Token): string; begin Result := ParserExpectedArgumentSeparator(CultureInfo.CurrentCulture, currentToken); end; class function Resources.Math.ParserExpectedArgumentSeparator(culture: CultureInfo; currentToken: Token): string; begin Result := ParserExpectedMsg(culture, currentToken, 'parserExpArgSep', nil); end; class function Resources.Math.ParserExpectedMsg(culture: CultureInfo; currentToken: Token; expectedId: string; args: ObjectArray): string; begin if currentToken <> nil then Result := GetResourceString(culture, 'ParserExpBase', GetResourceString(culture, expectedId, args), currentToken.Line, currentToken.Column) else Result := GetResourceString(culture, 'ParserExpBase', GetResourceString(culture, expectedId, args), '?', '?'); end; class function Resources.Math.ParserExpectedPrimary(currentToken: Token): string; begin Result := ParserExpectedPrimary(CultureInfo.CurrentCulture, currentToken); end; class function Resources.Math.ParserExpectedPrimary(culture: CultureInfo; currentToken: Token): string; begin Result := ParserExpectedMsg(culture, currentToken, 'ParserExpPrimary', nil); end; class function Resources.Math.ParserUnknownIdentifier(currentToken: Token): string; begin Result := ParserUnknownIdentifier(CultureInfo.InvariantCulture, currentToken); end; class function Resources.Math.ParserUnknownIdentifier(culture: CultureInfo; currentToken: Token): string; begin Result := GetResourceString(culture, 'ParserUnknownIdent', currentToken.Literal, currentToken.Line, currentToken.Column); end; {$ENDREGION} end. Index: Jedi.Math.Evaluation.Base.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Math.Evaluation.Base.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Math.Evaluation.Base.pas 25 Sep 2005 11:28:07 -0000 1.2 --- Jedi.Math.Evaluation.Base.pas 24 Dec 2005 12:25:13 -0000 1.3 *************** *** 413,417 **** Jedi.Math.Evaluation.Tokenization, Jedi.Math.Evaluation.Tokens, ! Jedi.Math.Resources; {$ENDREGION} --- 413,417 ---- Jedi.Math.Evaluation.Tokenization, Jedi.Math.Evaluation.Tokens, ! Jedi.System.Resources; {$ENDREGION} *************** *** 565,574 **** begin if (al.Count = MaxArgs) and not (parser.Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create(Resources.ParserExpectedClosingParenthesis(parser.Tokens.Current, openParToken)); if al.Count > 0 then begin if not (parser.Tokens.Current is CommaToken) then ! raise ParserException.Create(Resources.ParserExpectedArgumentSeparator(parser.Tokens.Current)); parser.Tokens.Next; end; --- 565,574 ---- begin if (al.Count = MaxArgs) and not (parser.Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create(Resources.Math.ParserExpectedClosingParenthesis(parser.Tokens.Current, openParToken)); if al.Count > 0 then begin if not (parser.Tokens.Current is CommaToken) then ! raise ParserException.Create(Resources.Math.ParserExpectedArgumentSeparator(parser.Tokens.Current)); parser.Tokens.Next; end; *************** *** 576,580 **** end; if not (parser.Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create(Resources.ParserExpectedClosingParenthesis(parser.Tokens.Current, openParToken)); end; end; --- 576,581 ---- end; if not (parser.Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create( ! Resources.Math.ParserExpectedClosingParenthesis(parser.Tokens.Current, openParToken)); end; end; *************** *** 786,790 **** Result := Processor.ProcessConditionalTrueValue(Result, ProcessConditional); if not tokens.Next or (Tokens.Current is ConditionValueSeparatorToken) then ! raise ParserException.Create(Resources.ParserExpectedConditionalValueSeparator(Tokens.Current)); EndTypes := oldEndTokens; Skipping := oldSkipping or skipFalse; --- 787,791 ---- Result := Processor.ProcessConditionalTrueValue(Result, ProcessConditional); if not tokens.Next or (Tokens.Current is ConditionValueSeparatorToken) then ! raise ParserException.Create(Resources.Math.ParserExpectedConditionalValueSeparator(Tokens.Current)); EndTypes := oldEndTokens; Skipping := oldSkipping or skipFalse; *************** *** 917,921 **** end; if not (Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create(Resources.ParserExpectedClosingParenthesis(Tokens.Current, startToken)); Tokens.Next; end --- 918,922 ---- end; if not (Tokens.Current is CloseParenthesisToken) then ! raise ParserException.Create(Resources.Math.ParserExpectedClosingParenthesis(Tokens.Current, startToken)); Tokens.Next; end *************** *** 931,935 **** sym := Namespace.Resolve(Tokens.Current.Literal); if sym = nil then ! raise ParserException.Create(resources.ParserUnknownIdentifier(Tokens.Current)); if sym is Constant then Result := Processor.LoadConstant(Constant(sym)) --- 932,936 ---- sym := Namespace.Resolve(Tokens.Current.Literal); if sym = nil then ! raise ParserException.Create(Resources.Math.ParserUnknownIdentifier(Tokens.Current)); if sym is Constant then Result := Processor.LoadConstant(Constant(sym)) *************** *** 942,946 **** end else ! raise ParserException.Create(Resources.ParserExpectedPrimary(Tokens.Current)); end; --- 943,947 ---- end else ! raise ParserException.Create(Resources.Math.ParserExpectedPrimary(Tokens.Current)); end; Index: Jedi.Collections.InlineEditable.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Collections.InlineEditable.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Collections.InlineEditable.pas 23 Jan 2005 11:05:51 -0000 1.3 --- Jedi.Collections.InlineEditable.pas 24 Dec 2005 12:25:13 -0000 1.4 *************** *** 26,36 **** interface ! {$REGION 'interface uses'} uses Jedi.System.Attributes, Jedi.System.SourceVersioning, System.Collections, System.Collections.Specialized, System.ComponentModel, System.Drawing.Design, [...1320 lines suppressed...] end; ! function InlineDictionaryBase.GetService(serviceType: &Type): &Object; begin Result := nil; end; ! function InlineDictionaryBase.GetItemDescription(key: &Object): string; begin Result := ''; end; ! function InlineDictionaryBase.GetItemEmptyValue(key: &Object): &Object; begin Result := nil; end; ! function InlineDictionaryBase.GetItemProperty(key, value: &Object): PropertyDescriptor; begin Result := InlineCollectionUtils.CreateItemProperty(value.GetType, AttributeArray.Create(), Self, key.ToString, Index: Jedi.System.SourceVersioning.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.SourceVersioning.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.System.SourceVersioning.pas 14 Mar 2005 13:30:14 -0000 1.5 --- Jedi.System.SourceVersioning.pas 24 Dec 2005 12:25:13 -0000 1.6 *************** *** 26,35 **** interface ! type {$REGION 'Helper types (Delphi only)'} IntegerArray = array of Integer; {$ENDREGION} {$REGION 'Forward declarations'} Revision = record; {$ENDREGION} --- 26,43 ---- interface ! {$REGION 'uses'} ! uses ! System.Globalization, ! System.IO, ! System.Text; ! {$ENDREGION} ! {$REGION 'Helper types (Delphi only)'} + type IntegerArray = array of Integer; {$ENDREGION} {$REGION 'Forward declarations'} + type Revision = record; {$ENDREGION} *************** *** 39,46 **** AttributeTargets.Interface or AttributeTargets.Struct, &Inherited = False)] SourceInfoAttribute = class (Attribute) - {$REGION 'Constants'} - strict protected - const dateFormat = 'yyyy''/''MM''/''dd HH'':''mm'':''ss'; - {$ENDREGION} {$REGION 'Constructors'} public --- 47,50 ---- *************** *** 50,53 **** --- 54,61 ---- constructor Create(sourceFile: string; revision: Double; date: string); overload; {$ENDREGION} + {$REGION 'Constants'} + strict protected + const dateFormat = 'yyyy''/''MM''/''dd HH'':''mm'':''ss'; + {$ENDREGION} {$REGION 'Data'} strict private *************** *** 90,98 **** {$REGION 'JediSourceVersion attribute'} JediSourceInfoAttribute = class (CVSSourceInfoAttribute) - {$REGION 'Constants'} - public - const IgnoreLevel = 2; - {$ENDREGION} {$REGION 'Constructors'} public --- 98,107 ---- {$REGION 'JediSourceVersion attribute'} + [CVSSourceInfo( + '$Source$', + '$Revision$', + '$Date$', + 2)] JediSourceInfoAttribute = class (CVSSourceInfoAttribute) {$REGION 'Constructors'} public *************** *** 100,108 **** constructor Create(sourceFile, revision, date: string); overload; {$ENDREGION} end; {$ENDREGION} {$REGION 'Revision type'} ! [JediSourceInfoAttribute('$Header$')] Revision = record (IComparable) {$REGION 'Constructors'} --- 109,124 ---- constructor Create(sourceFile, revision, date: string); overload; {$ENDREGION} + {$REGION 'Constants'} + public + const IgnoreLevel = 2; + {$ENDREGION} end; {$ENDREGION} {$REGION 'Revision type'} ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] Revision = record (IComparable) {$REGION 'Constructors'} *************** *** 137,143 **** class operator Implicit(const Value: Revision): string; {$ENDREGION} ! {$REGION 'Overrides'} public function Equals(obj: &Object): Boolean; override; function ToString: string; override; {$ENDREGION} --- 153,168 ---- class operator Implicit(const Value: Revision): string; {$ENDREGION} ! {$REGION 'Alternative comparisons methods'} public function Equals(obj: &Object): Boolean; override; + function IsGreaterThan(obj: &Object): Boolean; + function IsLessThan(obj: &Object): Boolean; + function IsSubBranchOf(revision: Revision): Boolean; + {$ENDREGION} + {$REGION 'Alternative conversion methods'} + public + class function FromDouble(value: Double): Revision; static; + class function FromString(value: string): Revision; static; + function ToDouble: Double; function ToString: string; override; {$ENDREGION} *************** *** 152,159 **** property Items[&index: Integer]: Integer read get_Items; default; {$ENDREGION} - {$REGION 'Additional comparisons'} - public - function IsSubBranchOf(revision: Revision): Boolean; - {$ENDREGION} end; {$ENDREGION} --- 177,180 ---- *************** *** 161,165 **** {$REGION 'SourceInfo class'} type ! [JediSourceInfoAttribute('$Header$')] SourceInfo = class (&Object) {$REGION 'Constructor'} --- 182,189 ---- {$REGION 'SourceInfo class'} type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] SourceInfo = class (&Object) {$REGION 'Constructor'} *************** *** 198,204 **** {$REGION 'implementation uses'} uses ! System.Globalization, ! System.IO, ! System.Text, Jedi.System.Strings; {$ENDREGION} --- 222,227 ---- {$REGION 'implementation uses'} uses ! Jedi.Core.Resources, ! Jedi.System.FrameworkResources, Jedi.System.Strings; {$ENDREGION} *************** *** 254,262 **** id := id.Substring(9, id.Length - 10).Trim else ! raise FormatException.Create('Not an $Id' + '$ or $Header' + '$ CVS keyword expansion.'); idx := id.ToLower.IndexOf(',v '); if idx <= 0 then ! raise FormatException.Create('file name not found in the specified id string.'); source := id.Substring(0, idx); id := id.Remove(0, idx + 3).Trim; --- 277,285 ---- id := id.Substring(9, id.Length - 10).Trim else ! raise FormatException.Create(Resources.SourceVersioning.CVSHeaderInvalid); idx := id.ToLower.IndexOf(',v '); if idx <= 0 then ! raise FormatException.Create(Resources.SourceVersioning.CVSHeaderMissingFileName); source := id.Substring(0, idx); id := id.Remove(0, idx + 3).Trim; *************** *** 264,268 **** idx := id.IndexOf(' '); if idx < 0 then ! raise FormatException.Create('revision number not found in the specified id string.'); revision := id.Substring(0, idx); id := id.Remove(0, idx + 1).Trim; --- 287,291 ---- idx := id.IndexOf(' '); if idx < 0 then ! raise FormatException.Create(Resources.SourceVersioning.CVSHeaderMissingRevision); revision := id.Substring(0, idx); id := id.Remove(0, idx + 1).Trim; *************** *** 270,277 **** idx := id.IndexOf(' '); if idx < 0 then ! raise FormatException.Create('date not found in the specified id string.'); idx := id.IndexOf(' ', idx + 1); if idx < 0 then ! raise FormatException.Create('date not found in the specified id string.'); date := DateTime.ParseExact(id.Substring(0, idx).Trim, dateFormat, DateTimeFormatInfo.InvariantInfo); end; --- 293,300 ---- idx := id.IndexOf(' '); if idx < 0 then ! raise FormatException.Create(Resources.SourceVersioning.CVSHeaderMissingDate); idx := id.IndexOf(' ', idx + 1); if idx < 0 then ! raise FormatException.Create(Resources.SourceVersioning.CVSHeaderMissingDate); date := DateTime.ParseExact(id.Substring(0, idx).Trim, dateFormat, DateTimeFormatInfo.InvariantInfo); end; *************** *** 305,309 **** begin if levels < 0 then ! raise ArgumentOutOfRangeException.Create('levels', 'Must be zero or positive.'); idx := -1; while levels > 0 do --- 328,332 ---- begin if levels < 0 then ! raise ArgumentOutOfRangeException.Create('levels', MscorlibResources.ArgumentMustBeNonNegative('levels')); idx := -1; while levels > 0 do *************** *** 312,316 **** System.IO.Path.DirectorySeparatorChar], idx + 1); if idx < 0 then ! raise ArgumentOutOfRangeException.Create('levels', 'Path does not contain that many levels.'); Dec(levels); end; --- 335,339 ---- System.IO.Path.DirectorySeparatorChar], idx + 1); if idx < 0 then ! raise ArgumentOutOfRangeException.Create('levels', Resources.SourceVersioning.TooManyPathLevels); Dec(levels); end; *************** *** 399,402 **** --- 422,435 ---- end; + class function Revision.FromDouble(value: Double): Revision; + begin + Result := Revision.Create(value); + end; + + class function Revision.FromString(value: string): Revision; + begin + Result := Revision.Create(value); + end; + function Revision.get_Count: Integer; begin *************** *** 442,445 **** --- 475,488 ---- end; + function Revision.IsGreaterThan(obj: &Object): Boolean; + begin + Result := CompareTo(obj) > 0; + end; + + function Revision.IsLessThan(obj: &Object): Boolean; + begin + Result := CompareTo(obj) < 0; + end; + function Revision.IsSubBranchOf(revision: Revision): Boolean; var *************** *** 475,478 **** --- 518,526 ---- end; + function Revision.ToDouble: Double; + begin + Result := Self; + end; + function Revision.ToString: string; var Index: Jedi.Text.Tokenization.InputBase.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Text.Tokenization.InputBase.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Text.Tokenization.InputBase.pas 25 Sep 2005 11:27:26 -0000 1.1 --- Jedi.Text.Tokenization.InputBase.pas 24 Dec 2005 12:25:13 -0000 1.2 *************** *** 8,12 **** limitations under the License. ! The Original Code is: Jedi.Text.Tokenization.InputBase.pas, released on --. The Initial Developer of the Original Code is Marcel Bestebroer --- 8,12 ---- limitations under the License. ! The Original Code is: Jedi.Text.Tokenization.InputBase.pas, released on 2005-09-25. The Initial Developer of the Original Code is Marcel Bestebroer *************** *** 44,48 **** {$REGION 'Constructors'} public ! constructor Create(tabSet: StringUtils.TabSet); {$ENDREGION} {$REGION 'Data'} --- 44,48 ---- {$REGION 'Constructors'} public ! constructor Create(tabSet: TabSet); {$ENDREGION} {$REGION 'Data'} *************** *** 54,58 **** FSavedInfos: Stack; FSequence: StringBuilder; ! FTabSet: StringUtils.TabSet; {$ENDREGION} {$REGION 'Abstract methods'} --- 54,58 ---- FSavedInfos: Stack; FSequence: StringBuilder; ! FTabSet: TabSet; {$ENDREGION} {$REGION 'Abstract methods'} *************** *** 86,95 **** property Line: Integer read FLine; property Sequence: string read get_Sequence; ! property TabSet: StringUtils.TabSet read FTabSet; {$ENDREGION} {$REGION 'TextReader-based input provider instantiation'} public class function FromReader(reader: TextReader): TokenizerInputProvider; overload; static; ! class function FromReader(reader: TextReader; tabSet: StringUtils.TabSet): TokenizerInputProvider; overload; static; {$ENDREGION} end; --- 86,95 ---- property Line: Integer read FLine; property Sequence: string read get_Sequence; ! property TabSet: TabSet read FTabSet; {$ENDREGION} {$REGION 'TextReader-based input provider instantiation'} public class function FromReader(reader: TextReader): TokenizerInputProvider; overload; static; ! class function FromReader(reader: TextReader; tabSet: TabSet): TokenizerInputProvider; overload; static; {$ENDREGION} end; *************** *** 107,111 **** {$REGION 'Constructors'} public ! constructor Create(reader: TextReader; tabSet: StringUtils.TabSet); {$ENDREGION} {$REGION 'Data'} --- 107,111 ---- {$REGION 'Constructors'} public ! constructor Create(reader: TextReader; tabSet: TabSet); {$ENDREGION} {$REGION 'Data'} *************** *** 150,154 **** {$REGION 'ReaderProvider'} ! constructor ReaderProvider.Create(reader: TextReader; tabSet: StringUtils.TabSet); begin inherited Create(tabSet); --- 150,154 ---- {$REGION 'ReaderProvider'} ! constructor ReaderProvider.Create(reader: TextReader; tabSet: TabSet); begin inherited Create(tabSet); *************** *** 192,196 **** {$REGION 'TokenizerInputProvider'} ! constructor TokenizerInputProvider.Create(tabSet: StringUtils.TabSet); begin inherited Create; --- 192,196 ---- {$REGION 'TokenizerInputProvider'} ! constructor TokenizerInputProvider.Create(tabSet: TabSet); begin inherited Create; *************** *** 210,218 **** class function TokenizerInputProvider.FromReader(reader: TextReader): TokenizerInputProvider; begin ! Result := ReaderProvider.Create(reader, StringUtils.TabSet.Create); end; ! class function TokenizerInputProvider.FromReader(reader: TextReader; ! tabSet: StringUtils.TabSet): TokenizerInputProvider; begin Result := ReaderProvider.Create(reader, tabSet); --- 210,217 ---- class function TokenizerInputProvider.FromReader(reader: TextReader): TokenizerInputProvider; begin ! Result := ReaderProvider.Create(reader, Jedi.System.Strings.TabSet.Create); end; ! class function TokenizerInputProvider.FromReader(reader: TextReader; tabSet: TabSet): TokenizerInputProvider; begin Result := ReaderProvider.Create(reader, tabSet); --- NEW FILE: Jedi.IO.Resources.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.IO.Resources.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 Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.IO.Resources.pas,v 1.1 2005/12/24 12:25:13 jedi_mbe Exp $ unit Jedi.IO.Resources; interface {$REGION 'uses'} uses Jedi.System.SourceVersioning, Jedi.Timers.Schedules, System.Globalization, System.Resources; {$ENDREGION} {$REGION 'Helper types'} type ObjectArray = array of &Object; {$ENDREGION} {$REGION 'Jedi.IO resources'} type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.IO.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] Resources = class abstract (&Object) {$REGION 'Constructors'} strict private class constructor Create; strict protected constructor Create; {$ENDREGION} {$REGION 'Data'} strict private class var rm: ResourceManager; {$ENDREGION} {$REGION 'Basic string retrieval'} public class function GetResourceString(id: string): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string): string; overload; static; class function GetResourceString(id: string; arg0: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0: &Object): string; overload; static; class function GetResourceString(id: string; arg0, arg1: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0, arg1: &Object): string; overload; static; class function GetResourceString(id: string; arg0, arg1, arg2: &Object): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; arg0, arg1, arg2: &Object): string; overload; static; class function GetResourceString(id: string; args: ObjectArray): string; overload; static; class function GetResourceString(culture: CultureInfo; id: string; args: ObjectArray): string; overload; static; {$ENDREGION} {$REGION 'IniFiles related resources'} public type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.IO.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] IniFiles = class abstract (&Object) {$REGION 'Hidden constructor'} strict protected constructor Create; {$ENDREGION} {$REGION 'Internal base messages'} strict protected class function ReadErrorBase(culture: CultureInfo; reason: string): string; static; {$ENDREGION} {$REGION 'Exception messages'} public class function ReadError_NoSuchKey(key: string): string; overload; static; class function ReadError_NoSuchKey(culture: CultureInfo; key: string): string; overload; static; class function ReadError_NoSuchSectionAndKey(section, key: string): string; overload; static; class function ReadError_NoSuchSectionAndKey(culture: CultureInfo; section, key: string): string; overload; static; {$ENDREGION} end; {$ENDREGION} {$REGION 'Stream of ValueType related resources'} public type [JediSourceInfo( '$Source: /cvsroot/jedidotnet/main/run/Jedi.IO.Resources.pas,v $', '$Revision: 1.1 $', '$Date: 2005/12/24 12:25:13 $')] StreamOfValueType = class abstract (&Object) {$REGION 'Hidden constructor'} strict protected constructor Create; {$ENDREGION} {$REGION 'Exception messages'} public class function EmptyArrayNotAllowed: string; overload; static; class function EmptyArrayNotAllowed(culture: CultureInfo): string; overload; static; class function TypeNotAllowed(&type: System.Type): string; overload; static; class function TypeNotAllowed(culture: CultureInfo; &type: System.Type): string; overload; static; class function TypeNotAllowedInValueType(fieldType, valueTypeType: System.Type): string; overload; static; class function TypeNotAllowedInValueType(culture: CultureInfo; fieldType, valueTypeType: System.Type): string; overload; static; class function WrongValueType(actualType, expectedType: System.Type): string; overload; static; class function WrongValueType(culture: CultureInfo; actualType, expectedType: System.Type): string; overload; static; class function UninitializedField(fieldName: string; &type: System.Type): string; overload; static; class function UninitializedField(culture: CultureInfo; fieldName: string; &type: System.Type): string; overload; static; {$ENDREGION} end; {$ENDREGION} end; {$ENDREGION} implementation {$AUTOBOX ON} {$REGION 'Resources'} class constructor Resources.Create; begin rm := ResourceManager.Create('Jedi.IO', TypeOf(Resources).Assembly); end; constructor Resources.Create; begin inherited Create; end; class function Resources.GetResourceString(id: string): string; begin Result := GetResourceString(CultureInfo.CurrentCulture, id); end; class function Resources.GetResourceString(culture: CultureInfo; id: string): string; begin Result := rm.GetString(id, culture); end; class function Resources.GetResourceString(id: string; arg0: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0); end; class function Resources.GetResourceString(id: string; arg0, arg1: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0, arg1); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0, arg1: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0, arg1); end; class function Resources.GetResourceString(id: string; arg0, arg1, arg2: &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), arg0, arg1, arg2); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; arg0, arg1, arg2: &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), arg0, arg1, arg2); end; class function Resources.GetResourceString(id: string; args: array of &Object): string; begin Result := System.String.Format(GetResourceString(CultureInfo.CurrentCulture, id), args); end; class function Resources.GetResourceString(culture: CultureInfo; id: string; args: array of &Object): string; begin Result := System.String.Format(GetResourceString(culture, id), args); end; {$ENDREGION} {$REGION 'Resources.IniFiles'} constructor Resources.IniFiles.Create; begin inherited Create; end; class function Resources.IniFiles.ReadErrorBase(culture: CultureInfo; reason: string): string; begin Result := Resources.GetResourceString(culture, 'if_ReadErrorBase', reason); end; class function Resources.IniFiles.ReadError_NoSuchKey(key: string): string; begin Result := ReadError_NoSuchKey(CultureInfo.CurrentCulture, key); end; class function Resources.IniFiles.ReadError_NoSuchKey(culture: CultureInfo; key: string): string; begin Result := ReadErrorBase(culture, Resources.GetResourceString(culture, 'if_NoSuchKey', key)); end; class function Resources.IniFiles.ReadError_NoSuchSectionAndKey(section, key: string): string; begin Result := ReadError_NoSuchSectionAndKey(CultureInfo.CurrentCulture, section, key); end; class function Resources.IniFiles.ReadError_NoSuchSectionAndKey(culture: CultureInfo; section, key: string): string; begin Result := ReadErrorBase(culture, Resources.GetResourceString(culture, 'if_NoSuchSectionAndKey', section, key)); end; {$ENDREGION} {$REGION 'Resources.StreamOfValueType'} constructor Resources.StreamOfValueType.Create; begin inherited Create; end; class function Resources.StreamOfValueType.EmptyArrayNotAllowed: string; begin Result := EmptyArrayNotAllowed(CultureInfo.CurrentCulture); end; class function Resources.StreamOfValueType.EmptyArrayNotAllowed(culture: CultureInfo): string; begin Result := Resources.GetResourceString(culture, 'sovt_EmptyArrayNotAllowed'); end; class function Resources.StreamOfValueType.TypeNotAllowed(&type: System.Type): string; begin Result := TypeNotAllowed(CultureInfo.CurrentCulture, &type); end; class function Resources.StreamOfValueType.TypeNotAllowed(culture: CultureInfo; &type: System.Type): string; begin Result := Resources.GetResourceString(culture, 'sovt_TypeNotAllowed', &type.FullName); end; class function Resources.StreamOfValueType.TypeNotAllowedInValueType(fieldType, valueTypeType: System.Type): string; begin Result := TypeNotAllowedInValueType(CultureInfo.CurrentCulture, fieldType, valueTypeType); end; class function Resources.StreamOfValueType.TypeNotAllowedInValueType(culture: CultureInfo; fieldType, valueTypeType: System.Type): string; begin Result := Resources.GetResourceString(culture, 'sovt_TypeNotAllowedInRecord', fieldType.FullName, valueTypeType.FullName); end; class function Resources.StreamOfValueType.WrongValueType(actualType, expectedType: System.Type): string; begin Result := WrongValueType(CultureInfo.CurrentCulture, actualType, expectedType); end; class function Resources.StreamOfValueType.WrongValueType(culture: CultureInfo; actualType, expectedType: System.Type): string; begin Result := Resources.GetResourceString(culture, 'sovt_WrongValueType', actualType.FullName, expectedType.FullName); end; class function Resources.StreamOfValueType.UninitializedField(fieldName: string; &type: System.Type): string; begin Result := UninitializedField(CultureInfo.CurrentCulture, fieldName, &type); end; class function Resources.StreamOfValueType.UninitializedField(culture: CultureInfo; fieldName: string; &type: System.Type): string; begin Result := Resources.GetResourceString(culture, 'sovt_UninitialedField', fieldName, &type.FullName); end; {$ENDREGION} end. Index: Jedi.IO.IniFiles.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.IO.IniFiles.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jedi.IO.IniFiles.pas 16 Jun 2005 13:15:17 -0000 1.6 --- Jedi.IO.IniFiles.pas 24 Dec 2005 12:25:13 -0000 1.7 *************** *** 34,37 **** --- 34,38 ---- System.Resources, System.Threading, + Jedi.IO.Resources, Jedi.System.FrameworkResources, Jedi.System.SourceVersioning, *************** *** 50,54 **** type {$REGION 'Enumerator entry'} ! [JediSourceInfo('$Header$')] IniFileEntry = record strict private --- 51,58 ---- type {$REGION 'Enumerator entry'} ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] IniFileEntry = record strict private *************** *** 65,69 **** {$REGION 'Enumerator interface'} ! [JediSourceInfo('$Header$')] IIniFileEnumerator = interface (IEnumerator) function Key: string; --- 69,76 ---- {$REGION 'Enumerator interface'} ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] IIniFileEnumerator = interface (IEnumerator) function Key: string; *************** *** 76,80 **** {$REGION 'Base class'} type ! [JediSourceInfo('$Header$')] IniFileBase = class abstract (&Object) {$REGION 'Private data'} --- 83,90 ---- {$REGION 'Base class'} type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] IniFileBase = class abstract (&Object) {$REGION 'Private data'} *************** *** 87,91 **** strict protected type ! [JediSourceInfo('$Header$')] IniFileEnumerator = class abstract (&Object, IIniFileEnumerator, ICloneable, IEnumerator) {$REGION 'Internal data'} --- 97,104 ---- strict protected type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] IniFileEnumerator = class abstract (&Object, IIniFileEnumerator, ICloneable, IEnumerator) {$REGION 'Internal data'} *************** *** 242,246 **** {$REGION 'Memory based base class'} type ! [JediSourceInfo('$Header$')] MemoryIniFileBase = class abstract (IniFileBase) {$REGION 'Constructor'} --- 255,262 ---- {$REGION 'Memory based base class'} type ! [JediSourceInfo( ! '$Source$', ! '$Revision$', ! '$Date$')] MemoryIniFileBase = class abstract (IniFileBase) {$REGION 'Constructor'} *************** *** 259,263 **** strict protected type ... [truncated message content] |