/// <summary> /// Fetch the latest version of the profile version /// </summary> void Fill() { PersonalProfiles = new Dictionary<string, RegistrationPersonal>(); ApplicationProfiles = new Dictionary<string, RegistrationApplication>(); ApplicationProfilesDefault = new Dictionary<string, string>(); DeviceProfiles = new Dictionary<string, RegistrationDevice>(); var ProfileKeys = Register.GetSubKeys(Constants.RegistryPersonal); var DeviceKeys = Register.GetKeys(Constants.RegistryDevice); var ApplicationKeys = Register.GetKeys(Constants.RegistryApplication); string DefaultDevice = null; foreach (var KeySet in ProfileKeys) { var Filename = KeySet.GetValueString(""); if (Filename != "") { var Profile = new RegistrationPersonal(KeySet.Key, Filename); if (Profile != null) { PersonalProfiles.Add(KeySet.Key, Profile); // add Archive var Archive = KeySet.GetValueString("Archive"); Profile.Archive = Archive; // add Portals var Portals = KeySet.GetValueMultiString("Portals"); Profile.Portals = Portals?.ToList(); if (KeySet.Default) { _Personal = Profile; } } } } foreach (var Key in ApplicationKeys) { if (Key.Key.Length > 10) { var Profile = new RegistrationApplication(Key.Key, Key.Value); if (Profile != null) { ApplicationProfiles.Add(Key.Key, Profile); } } else { ApplicationProfilesDefault.Add(Key.Key, Key.Value); } } foreach (var Key in DeviceKeys) { if (Key.Key != "") { var Profile = new RegistrationDevice(Key.Key, Key.Value); if (Profile != null) { DeviceProfiles.Add(Key.Key, Profile); } } else { DefaultDevice = Key.Value; } } if (DefaultDevice != null) { DeviceProfiles.TryGetValue(DefaultDevice, out _Device); } return; }
/// <summary> /// Add the associated profile to the machine store. /// </summary> /// <param name="SignedApplicationProfile">Profile to add.</param> /// <returns>The registration created</returns> public RegistrationApplication Add(SignedApplicationProfile SignedApplicationProfile) { var Registration = new RegistrationApplication(SignedApplicationProfile); Add(Registration); return Registration; }
/// <summary> /// Locate the specified application profile. /// </summary> /// <param name="Profile">Profile entry for requested application.</param> /// <returns>The registration application.</returns> public RegistrationApplication Get(ApplicationProfileEntry Profile) { var Result = new RegistrationApplication(Profile.Identifier); return Result; }
/// <summary> /// Add the associated registration to the machine store. /// </summary> /// <param name="Registration">Profile to add.</param> public void Add(RegistrationApplication Registration) { ApplicationProfiles.Add(Registration.UDF, Registration); //PersonalProfiles.Add(Registration.UDF, Registration); //// If no existing default, register as the default //if (Personal == null) { // Personal = Registration; // } }
void Report(RegistrationApplication Registration) { Report(Registration.Profile); }
private void GetPasswordProfile () { PasswordEntry = SignedPersonalProfile.Signed.GetApplicationEntryPassword( null); PasswordRegistration = Machine.Get(PasswordEntry); SignedApplicationWeb = PasswordRegistration.Profile; PasswordProfile = SignedApplicationWeb.Signed as PasswordProfile; PasswordProfile.Link (SignedPersonalProfile.Signed, PasswordEntry); PasswordProfilePrivate = PasswordProfile.Private; return; }