protected override void PopulateDataSource() { using (Stream stream = _streamFactory.CreateInstance(StreamMode.Read)) { XmlSerializer serializer = new XmlSerializer(typeof(TRootNode)); _rootNode = (TRootNode)serializer.Deserialize(stream); _dataSource = ((TEntity[])_childNodesProperty.GetValue(_rootNode)).ToList(); } }
protected override void PopulateDataSource() { using (Stream stream = _streamFactory.CreateInstance(StreamMode.Read)) { using (StreamReader streamReader = new StreamReader(stream)) { _dataSource = ((TEntity[])_fileHelperEngine.ReadStream(streamReader)).ToList(); } } }