예제 #1
0
 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();
     }
 }
예제 #2
0
 protected override void PopulateDataSource()
 {
     using (Stream stream = _streamFactory.CreateInstance(StreamMode.Read))
     {
         using (StreamReader streamReader = new StreamReader(stream))
         {
             _dataSource = ((TEntity[])_fileHelperEngine.ReadStream(streamReader)).ToList();
         }
     }
 }