private async Task AddNewDescriptor(GattCharacteristic gattCharacteristic, GattDescriptorDescription descriptor) { var gattDescriptor1Properties = GattPropertiesFactory.CreateGattDescriptor(descriptor); var gattDescriptor = gattCharacteristic.AddDescriptor(gattDescriptor1Properties); await _ServerContext.Connection.RegisterObjectAsync(gattDescriptor); }
private async Task <GattCharacteristic> AddNewCharacteristic(GattService gattService, GattCharacteristicDescription characteristic) { var gattCharacteristic1Properties = GattPropertiesFactory.CreateGattCharacteristic(characteristic); var gattCharacteristic = gattService.AddCharacteristic(gattCharacteristic1Properties, characteristic.CharacteristicSource); await _ServerContext.Connection.RegisterObjectAsync(gattCharacteristic); return(gattCharacteristic); }
private async Task <GattService> AddNewService(GattApplication application, GattServiceDescription serviceDescription) { var gattService1Properties = GattPropertiesFactory.CreateGattService(serviceDescription); var gattService = application.AddService(gattService1Properties); await _ServerContext.Connection.RegisterObjectAsync(gattService); return(gattService); }