public async void CreateService()

in BluetoothLEExplorer/BluetoothLEExplorer/ViewModels/VirtualPeripheralPageViewModel.cs [118:165]


        public async void CreateService()
        {
            GattServicesLibrary.GenericGattService service = null;

            if (NewSelectedService == null)
            {
                return;
            }

            Views.Busy.SetBusy(true, "Creating Service");

            switch(NewSelectedService)
            {
                case "Alert Notification Service":
                    service = new GattServicesLibrary.Services.AlertNotificationService();
                    break;

                case "Current Time Service":
                    service = new GattServicesLibrary.Services.CurrentTimeService();
                    break;

                case "Battery Service":
                    service = new GattServicesLibrary.Services.BatteryService();
                    break;

                case "Microsoft Service":
                    service = new GattServicesLibrary.Services.MicrosoftService();
                    break;

                case "Heart Rate Service":
                    service = new GattServicesLibrary.Services.HeartRateService();
                    break;

                case "Blood Pressure Service":
                    service = new GattServicesLibrary.Services.BloodPressureService();
                    break;

                default:
                    return;
            }
            
            await service.Init();
            GenericGattServiceViewModel serviceVM = new GenericGattServiceViewModel(service);
            Context.CreatedServices.Add(serviceVM);
            Context.SelectedGattServerService = serviceVM;
            NavigateToService();
            return;
        }