/// <summary>
        /// Loads from XML.
        /// </summary>
        /// <param name="stream">The stream.</param>
        public void LoadFromXml(StreamReader stream)
        {
            FileCabinetRecordXmlReader xmlReader = new FileCabinetRecordXmlReader(stream);

            this.Records = new ReadOnlyCollection <FileCabinetRecord>(xmlReader.ReadAll());
        }
        /// <summary>
        /// Loads from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="validator">The validator.</param>
        /// <param name="modelWriter">console writer.</param>
        public void LoadFromXml(StreamReader reader, IRecordValidator validator, ModelWriters modelWriter)
        {
            FileCabinetRecordXmlReader xmlReader = new FileCabinetRecordXmlReader(reader, validator, modelWriter);

            this.ReadRecords = xmlReader.ReadAll();
        }