Exemplo n.º 1
0
 //Disconnects from current Band device.
 public void Disconnect()
 {
     CheckDisposed();
     var nativeClient = Native;
     Native = null;
     nativeClient.Dispose();
 }
Exemplo n.º 2
0
        internal BandClient(NativeBandClient client)
        {
            this.Native = client;

            this.sensors         = new Lazy <BandSensorManager>(() => new BandSensorManager(this, Native.SensorManager));
            this.tiles           = new Lazy <BandTileManager>(() => new BandTileManager(this, Native.TileManager));
            this.notifications   = new Lazy <BandNotificationManager>(() => new BandNotificationManager(this, Native.NotificationManager));
            this.personalization = new Lazy <BandPersonalizationManager>(() => new BandPersonalizationManager(this, Native.PersonalizationManager));
        }
        internal BandClient(NativeBandClient client)
        {
            this.Native = client;

            this.sensors = new Lazy<BandSensorManager>(() => new BandSensorManager(this, Native.SensorManager));
            this.tiles = new Lazy<BandTileManager>(() => new BandTileManager(this, Native.TileManager));
            this.notifications = new Lazy<BandNotificationManager>(() => new BandNotificationManager(this, Native.NotificationManager));
            this.personalization = new Lazy<BandPersonalizationManager>(() => new BandPersonalizationManager(this, Native.PersonalizationManager));
        }
Exemplo n.º 4
0
        public async Task DisconnectAsync()
        {
            CheckDisposed();

#if __ANDROID__ || __IOS__ || WINDOWS_PHONE_APP
            var nativeClient = Native;
            Native = null;
#endif

#if __ANDROID__
            await nativeClient.DisconnectTaskAsync();
#elif __IOS__
            await NativeBandClientManager.Instance.DisconnectTaskAsync(nativeClient);
#elif WINDOWS_PHONE_APP
            nativeClient.Dispose();
#endif
        }
Exemplo n.º 5
0
 internal BandClient(NativeBandClient client)
 {
     this.Native = client;
     this.tile = new Lazy<TileManager>(() => new TileManager(this, Native.TileManager));
     this.notification = new Lazy<NotificationManager>(() => new NotificationManager(this, Native.NotificationManager));
 }
        /// <summary>
        /// Disconnects from the current Band device.
        /// </summary>
        public async Task DisconnectAsync()
        {
            CheckDisposed();

#if __ANDROID__ || __IOS__ || WINDOWS_PHONE_APP
            var nativeClient = Native;
            Native = null;
#endif

#if __ANDROID__
            await nativeClient.DisconnectTaskAsync();
#elif __IOS__
            await NativeBandClientManager.Instance.DisconnectTaskAsync(nativeClient);
#elif WINDOWS_PHONE_APP
            nativeClient.Dispose();
#endif
        }