private void SetCurrentProfile()
 {
     var curId = CurrentProfileId;
     if (BuiltInNetworkProfiles.Profiles.ContainsKey(curId))
     {
         CurrentProfile = BuiltInNetworkProfiles.Profiles[curId];
         return;
     }
     CurrentProfile = new AppDataNetworkProfile(roamingContainer, curId);
 }
 /// <summary>
 /// Зарегистрировать профиль.
 /// </summary>
 /// <param name="profile">Профиль.</param>
 /// <returns>Задача.</returns>
 public Task RegisterProfile(INetworkProfile profile)
 {
     if (profile?.Id == null)
     {
         return Task.FromResult(true);
     }
     var profileData = new AppDataNetworkProfile(roamingContainer, profile.Id);
     profileData.CopyFrom(profile);
     profileData.Save();
     return Task.FromResult(true);
 }