private async Task LoadVpn() { Profiles.Clear(); Agent = new VpnManagementAgent(); var profiles = await Agent.GetProfilesAsync(); foreach (var profile in profiles) { Log($"PROFILE: {profile.ProfileName}"); Profiles.Add(profile); } }
private async Task <VpnNativeProfile> GetVPNConnectionProfile() { var profiles = await manager.GetProfilesAsync(); foreach (var profile in profiles) { if (profile is VpnNativeProfile nativeProfile && profile.ProfileName == ApplicationParameters.ConnectionName) { return(nativeProfile); } } return(null); }