Artemis.DAL.ProfileProvider.RenameProfile C# (CSharp) Method

RenameProfile() public static method

Renames the profile on the model and filesystem
public static RenameProfile ( ProfileModel profile, string name ) : void
profile Artemis.Profiles.ProfileModel The profile to rename
name string The new name
return void
        public static void RenameProfile(ProfileModel profile, string name)
        {
            if (string.IsNullOrEmpty(name))
                return;

            // Remove the old profile
            DeleteProfile(profile);

            // Update the profile, creating a new file
            profile.Name = name;
            AddOrUpdate(profile);
        }