public void CreateCustomMonitor() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); agent = new CustomUserAgent(); agent.SetAuthenticationParams(authentication); var a1 = agent.AddAgent("TestAgent1" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value<int>("data"); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); MonitorParameter param = new MonitorParameter("param1", "param1d", "val", DataType.String, false); MonResultParameter resParam = new MonResultParameter("MonResparam1", "MonResparam1d", "MonResval", DataType.String); MonResultParameter resAddParam = new MonResultParameter("MonAddResparam1", "MonAddResparam1d", "MonAddResval", DataType.String); var s = customMonitor.AddMonitor(_agentID, TestCustomMonitorName + DateTime.Now.Ticks.ToString(), "Test", "internal", new List<MonitorParameter>() { param }, new List<MonResultParameter>() { resParam }, new List<MonResultParameter>() { resAddParam }); _customMonitorID = JObject.Parse(s.Content).Value<int>("data"); GetTestMonitor(); }
public MonitisClrMethodInfoAnalizer(Authentication authentification) { _monitor = new CustomMonitor(); _monitor.SetAuthenticationParams(authentification); _agent = new CustomUserAgent(); _agent.SetAuthenticationParams(authentification); }
/// <summary> /// Initialize Adb Server and Monitor /// </summary> public static void InitializeAdbServer(string path) { Server.StartServer(Path.GetFullPath(Path.Combine(path)), restartServerIfNewer: false); var monitor = new DeviceMonitor(new AdbSocket(new IPEndPoint(IPAddress.Loopback, AdbClient.AdbServerPort))); Instance = CustomMonitor.Instance; monitor.DeviceConnected += OnDeviceConnected; monitor.DeviceChanged += OnDeviceChanged; monitor.DeviceDisconnected += OnDeviceDisconnected; monitor.Start(); }
public void CreateCustomMonitor() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); agent = new CustomUserAgent(); agent.SetAuthenticationParams(authentication); var a1 = agent.AddAgent("TestAgent1" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value <int>("data"); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); MonitorParameter param = new MonitorParameter("param1", "param1d", "val", DataType.String, false); MonResultParameter resParam = new MonResultParameter("MonResparam1", "MonResparam1d", "MonResval", DataType.String); MonResultParameter resAddParam = new MonResultParameter("MonAddResparam1", "MonAddResparam1d", "MonAddResval", DataType.String); var s = customMonitor.AddMonitor(_agentID, TestCustomMonitorName + DateTime.Now.Ticks.ToString(), "Test", "internal", new List <MonitorParameter>() { param }, new List <MonResultParameter>() { resParam }, new List <MonResultParameter>() { resAddParam }); _customMonitorID = JObject.Parse(s.Content).Value <int>("data"); GetTestMonitor(); }