Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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 }));
        }
Ejemplo n.º 3
0
        // Predecates

        public void AddCheck(string name, DeviceCheck check)
        {
            m_checks.Add(name, check);
        }