public static void Main(string[] args) { ReadByte objTest = new ReadByte(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(objTest.AppDomainUnhandledException_EventHandler); Console.WriteLine(s_strTFPath + " " + s_strTFName + " , for " + s_strClassMethod + " , Source ver : " + s_strDtTmVer); try { objTest.RunTest(); } catch (Exception e) { Console.WriteLine(s_strTFAbbrev + " : FAIL The following exception was thorwn in RunTest(): \n" + e.ToString()); objTest._numErrors++; objTest._exitValue = TCSupport.FailExitCode; } //// Finish Diagnostics if (objTest._numErrors == 0) { Console.WriteLine("PASS. "+ s_strTFPath + " " + s_strTFName + " ,numTestcases==" + objTest._numTestcases); } else { Console.WriteLine("FAIL! "+ s_strTFPath + " " + s_strTFName + " ,numErrors==" + objTest._numErrors); if (TCSupport.PassExitCode == objTest._exitValue) { objTest._exitValue = TCSupport.FailExitCode; } } Environment.ExitCode = objTest._exitValue; }
public void Dispose() { _encoding = null; _file = null; _buffer = null; _readFunction = null; }
public void Bind(FileStream file, int BufferStartOffset) { if (file == null) throw new ArgumentNullException("file"); _file = file; _readFunction = ReadFromFile; _file.Seek(_bufferStartOffset, SeekOrigin.Begin); ReadHeader(BufferStartOffset); }
public void Bind(byte[] buffer, int BufferStartOffset) { if (buffer == null) throw new ArgumentNullException("buffer"); _buffer = buffer; _readFunction = ReadFromBuffer; ReadHeader(BufferStartOffset); }
public BasicTypeDeSerializerContext(FileStream file) { if (file == null) throw new ArgumentNullException("file"); _file = file; _readFunction = ReadFromFile; ReadHeader(); }
public BasicTypeDeSerializerContext(byte[] buffer) { if (buffer == null) throw new ArgumentNullException("buffer"); _buffer = buffer; _readFunction = ReadFromBuffer; ReadHeader(); }