/// <summary> /// Send a file to testserver /// </summary> /// <param name="filename">Filename of the testcases dll</param> /// <param name="testurl">The testurl</param> public Guid SendFile(string filename, string testurl) { using (FileStream fileStream = new FileStream(filename, FileMode.Open)) { byte[] buffer = new byte[52428800]; int intSize = fileStream.Read(buffer, 0, 52428800); byte[] bufferShort = buffer.Take(intSize).ToArray(); return(_channel.AddTestJob(testurl, bufferShort)); } }
/// <summary> /// Send a file to testserver /// </summary> /// <param name="filename">Filename of the testcases dll</param> /// <param name="testsystem">testsystem of the testcases</param> private Guid SendFile(string filename, string testsystem) { using (FileStream fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { byte[] buffer = new byte[52428800]; int size = fileStream.Read(buffer, 0, 52428800); byte[] bufferShort = buffer.Take(size).ToArray(); try { return(_channel.AddTestJob(testsystem, bufferShort)); } catch (Exception e) { System.Windows.MessageBox.Show("An error occurred while requesting tests on the testserver: " + e); return(Guid.Empty); } } }