public CommandState GetCommandState(GoToDefinitionCommandArgs args) { if (NavigationService.CanNavigate(args.SubjectBuffer, args.TextView.Caret.Position.BufferPosition, out var kind)) { if (kind == MSBuildReferenceKind.NuGetID) { return(new CommandState(true, displayText: "Open on NuGet.org")); } return(CommandState.Available); } // visible but disabled return(new CommandState(true, false, false, true)); }
private async Task GetCodeAsync() { var phone = $"{CountryCode.Value}{PhoneNumber.Value}"; var success = await SignIpService.GetCodeAsync(phone); if (success) { var canNavigate = await NavigationService.CanNavigate <VerifyCodeViewModel>(); if (canNavigate) { await NavigationService.Navigate <VerifyCodeViewModel, PhoneNumberM>(new PhoneNumberM { Phone = phone }); } } Console.WriteLine($"status getting code: {success}"); }