CBPeripheral.IsConnected Proprietà

Definizione

Gli sviluppatori non devono usare questa proprietà obsoleta. Devono invece testare la State proprietà.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 7, ObjCRuntime.PlatformArchitecture.Arch64, null)]
[ObjCRuntime.Obsoleted(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool IsConnected { [Foundation.Export("isConnected")] [ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 7, ObjCRuntime.PlatformArchitecture.Arch64, null)] [ObjCRuntime.Obsoleted(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.IsConnected : bool

Valore della proprietà

Attributi

Commenti

Questa proprietà è stata deprecata in iOS 7 e rimossa in iOS 9. Lo stato della connessione deve essere determinato usando la State proprietà:

if (myPeripheral.State != CBPeripheralState.Connected)
{
   Console.WriteLine("Peripheral is not connected");
}

Si applica a