DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SaveXMLReport()

static bool AutoTestFixture::SaveXMLReport ( string data,
out string errorMessage )
inlinestaticprivate

См. определение в файле AutoTestFixture.c строка 8

9 {
10 int year, month, day, hour, minute, second;
11 GetYearMonthDayUTC(year, month, day);
12 GetHourMinuteSecondUTC(hour, minute, second);
13 string datetimeUTC = string.Format(DATETIME_FORMAT, year, month.ToStringLen(2), day.ToStringLen(2), hour.ToStringLen(2), minute.ToStringLen(2), second.ToStringLen(2));
14 string filename = string.Format(REPORT_FILE_NAME_TEMPLATE, datetimeUTC);
15
16 FileHandle handle = OpenFile(filename, FileMode.WRITE);
17 if (handle == 0)
18 {
19 errorMessage = string.Format("Cannot open file \"%1\" for writing", filename);
20 return false;
21 }
22
23 FPrint(handle, data);
24 CloseFile(handle);
25
26 return true;
27 }
static const string DATETIME_FORMAT
Определения AutoTestFixture.c:4
static const string REPORT_FILE_NAME_TEMPLATE
Определения AutoTestFixture.c:3
FileMode
Определения EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto void FPrint(FileHandle file, void var)
Write to file.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Определения EnSystem.c:390
proto void GetYearMonthDayUTC(out int year, out int month, out int day)
Returns UTC system date.
proto void GetHourMinuteSecondUTC(out int hour, out int minute, out int second)
Returns UTC system time.

Перекрестные ссылки CloseFile(), DATETIME_FORMAT, FPrint(), GetHourMinuteSecondUTC(), GetYearMonthDayUTC(), OpenFile() и REPORT_FILE_NAME_TEMPLATE.

Используется в AutotestRunner::Update().