2008-02-20 06:52:00 +00:00
|
|
|
unit XMLDataBindingHelpers;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
2014-08-25 18:26:12 +00:00
|
|
|
System.Classes;
|
|
|
|
|
2008-02-20 06:52:00 +00:00
|
|
|
|
|
|
|
type
|
2014-08-25 18:26:12 +00:00
|
|
|
TNamedFormatWriter = class(TStreamWriter)
|
2008-02-20 06:52:00 +00:00
|
|
|
public
|
2008-03-17 06:08:49 +00:00
|
|
|
procedure WriteNamedFmt(const ASource: String; const AParams: array of const);
|
2014-08-25 18:26:12 +00:00
|
|
|
procedure WriteLineNamedFmt(const ASource: String; const AParams: array of const);
|
2008-02-20 06:52:00 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
2008-03-17 06:08:49 +00:00
|
|
|
SysUtils,
|
|
|
|
|
|
|
|
X2UtNamedFormat;
|
2008-02-20 06:52:00 +00:00
|
|
|
|
|
|
|
|
2014-08-25 18:26:12 +00:00
|
|
|
{ TNamedFormatWriter }
|
|
|
|
procedure TNamedFormatWriter.WriteNamedFmt(const ASource: String; const AParams: array of const);
|
2008-03-17 06:08:49 +00:00
|
|
|
begin
|
|
|
|
Write(NamedFormat(ASource, AParams));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2014-08-25 18:26:12 +00:00
|
|
|
procedure TNamedFormatWriter.WriteLineNamedFmt(const ASource: String; const AParams: array of const);
|
2008-02-20 06:52:00 +00:00
|
|
|
begin
|
2014-08-25 18:26:12 +00:00
|
|
|
WriteLine(NamedFormat(ASource, AParams));
|
2008-02-20 06:52:00 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|
2008-03-09 20:36:27 +00:00
|
|
|
|