@@ -24,6 +24,8 @@ internal class ODataVirtualDataSourceDataProviderWorkerSettings
2424 public DataSourceSortDescriptionCollection SortDescriptions { get ; set ; }
2525
2626 public DataSourceFilterExpressionCollection FilterExpressions { get ; set ; }
27+
28+ public string [ ] DesiredProperties { get ; set ; }
2729 }
2830
2931
@@ -45,6 +47,7 @@ internal class ODataVirtualDataSourceDataProviderWorker
4547 private string _entitySet ;
4648 private DataSourceSortDescriptionCollection _sortDescriptions ;
4749 private DataSourceFilterExpressionCollection _filterExpressions ;
50+ private string [ ] _desiredPropeties ;
4851
4952 protected DataSourceSortDescriptionCollection SortDescriptions
5053 {
@@ -62,6 +65,14 @@ protected DataSourceFilterExpressionCollection FilterExpressions
6265 }
6366 }
6467
68+ protected string [ ] DesiredProperties
69+ {
70+ get
71+ {
72+ return _desiredPropeties ;
73+ }
74+ }
75+
6576 private List < ODataFeedAnnotations > _annotations =
6677 new List < ODataFeedAnnotations > ( ) ;
6778
@@ -112,6 +123,7 @@ public ODataVirtualDataSourceDataProviderWorker(ODataVirtualDataSourceDataProvid
112123 _entitySet = settings . EntitySet ;
113124 _sortDescriptions = settings . SortDescriptions ;
114125 _filterExpressions = settings . FilterExpressions ;
126+ _desiredPropeties = settings . DesiredProperties ;
115127 Task . Factory . StartNew ( ( ) => DoWork ( ) , TaskCreationOptions . LongRunning ) ;
116128 }
117129
@@ -228,6 +240,7 @@ private IDataSourceSchema ResolveSchema(IDictionary<string, object> item)
228240 }
229241
230242 private string _filterString = null ;
243+ private string _selectedString = null ;
231244
232245 protected override void MakeTaskForRequest ( AsyncDataSourcePageRequest request , int retryDelay )
233246 {
@@ -295,6 +308,11 @@ protected override void MakeTaskForRequest(AsyncDataSourcePageRequest request, i
295308 }
296309 }
297310 }
311+
312+ if ( DesiredProperties != null && DesiredProperties . Length > 0 )
313+ {
314+ client = client . Select ( DesiredProperties ) ;
315+ }
298316 }
299317
300318 Task < IEnumerable < IDictionary < string , object > > > task = client
0 commit comments