TextStreamIo streamIO;
FileName fileNameWithExt;
FileName fileName;
public void initFile()
{
#define.validationFileSuffix('-data-validation-errors.txt')
InteropPermission perm = new InteropPermission(InteropKind::ClrInterop);
perm.assert();
streamIO = TextStreamIO::constructForWrite(#utf8format);
streamIO.outRecordDelimiter(#delimiterCRLF);
fileName += #validationFileSuffix;
}
boolean validationFailed(FreeTxt _errorTxt)
{
boolean ret;
if(!streamIO)
{
this.initFile();
}
streamIO.write(_errorTxt);
return ret;
}
public void downloadFile()
{
if (streamIo != null)
{
File::SendFileToUser(streamIo.getStream(), fileName);
}
CodeAccessPermission::revertAssert();
}
FileName fileNameWithExt;
FileName fileName;
public void initFile()
{
#define.validationFileSuffix('-data-validation-errors.txt')
InteropPermission perm = new InteropPermission(InteropKind::ClrInterop);
perm.assert();
streamIO = TextStreamIO::constructForWrite(#utf8format);
streamIO.outRecordDelimiter(#delimiterCRLF);
fileName += #validationFileSuffix;
}
boolean validationFailed(FreeTxt _errorTxt)
{
boolean ret;
if(!streamIO)
{
this.initFile();
}
streamIO.write(_errorTxt);
return ret;
}
public void downloadFile()
{
if (streamIo != null)
{
File::SendFileToUser(streamIo.getStream(), fileName);
}
CodeAccessPermission::revertAssert();
}
No comments:
Post a Comment
Give me the commetns and solutions