forked from JaneySprings/NUnit-MAUI-Runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.cake
35 lines (27 loc) · 823 Bytes
/
utils.cake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Net;
using System.Net.Sockets;
public void RecieveXmlReport(string fileName) {
var file = System.IO.File.Create(fileName);
var ip = IPAddress.Parse("127.0.0.1");
var listener = new TcpListener(ip, 13000);
listener.Start();
var socket = listener.AcceptSocket();
var data = new byte[1024];
int readedBytes = 1;
while (readedBytes != 0) {
readedBytes = socket.Receive(data);
for (int i = 0; i < readedBytes; i++)
file.WriteByte(data[i]);
}
file.Close();
socket.Close();
listener.Stop();
}
public string GetSimulatorUDID() {
// foreach(var deviceInfo in ListAppleSimulators()) {
// if (deviceInfo.Name.Equals("iPhone 11")) {
// return deviceInfo.UDID;
// }
// }
return "";
}