private void Ping_PingCompleted(object sender, PingCompletedEventArgs e) { var reply = e.Reply; var name = e.UserState; Dictionary <string, string> result = new Dictionary <string, string>(); result.Add(name.ToString(), reply.Status.ToString()); DeviceCheck?.Invoke(DicToJsonStr(result)); }
internal static String RegisterDevice(String token, List <String> channels, DateTime?expiration) { DeviceRegistration deviceRegistration = new DeviceRegistration(); deviceRegistration.Channels = channels; deviceRegistration.Expiration = expiration; deviceRegistration.DeviceToken = token; deviceRegistration.DeviceId = Backendless.Messaging.DeviceID; deviceRegistration.Channels = channels; deviceRegistration.Os = DeviceCheck.GetDeviceOS(); return(Invoker.InvokeSync <String>(MessagingService.DEVICE_REGISTRATION_MANAGER_SERVER_ALIAS, "registerDevice", new Object[] { deviceRegistration })); }
// Predecates public void AddCheck(string name, DeviceCheck check) { m_checks.Add(name, check); }