Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }