/// <summary> /// Creates a new profiles descriptor. /// </summary> /// <param name="data">The profiles.</param> /// <returns>Returns the created profiles descriptor.</returns> public static ProfilesXml CreateXml(ProfileData[] data) { ProfilesXml profiles = new ProfilesXml(); profiles.Profile = new ProfileXml[data.Length]; profiles.Profile = data.Select(x => CreateXml(x)).ToArray(); return(profiles); }
/// <summary> /// Creates a new profile data array. /// </summary> /// <param name="descriptor">The descriptor of the profiles.</param> /// <returns>Returns the created profile data array.</returns> public static ProfileData[] Create(ProfilesXml descriptor) { ProfileData[] profiles = new ProfileData[CoreManager.MAX_PROFILES]; for (int i = 0; i < CoreManager.MAX_PROFILES; i++) { if (i < descriptor.Profile.Length) { profiles[i] = Create(descriptor.Profile[i]); } else { profiles[i] = new ProfileData(); } } return(profiles); }