예제 #1
0
 //Disconnects from current Band device.
 public void Disconnect()
 {
     CheckDisposed();
     var nativeClient = Native;
     Native = null;
     nativeClient.Dispose();
 }
예제 #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));
        }
예제 #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
        }
예제 #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
        }