Skip to content

Commit 2afac65

Browse files
switching to normal reflection
IG Xamarin.Forms doesn't have FastReflectionHelper available.
1 parent 81f0b77 commit 2afac65

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

DataSource.DataProviders.SQLite/SQLiteDataProvider/SQLiteVirtualDataSourceDataProviderWorker.cs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ private ISectionInformation[] ResolveGroupInformation()
258258
return groupInformation.ToArray();
259259
}
260260

261-
Dictionary<string, FastReflectionHelper> _groupHelpers = new Dictionary<string, FastReflectionHelper>();
262-
263261
private void AddGroup(
264262
List<ISectionInformation> groupInformation,
265263
List<string> groupNames, string[] groupNamesArray,
@@ -268,28 +266,12 @@ private void AddGroup(
268266
List<object> groupValues = new List<object>();
269267
foreach (var name in groupNames)
270268
{
271-
FastReflectionHelper helper;
272-
if (!_groupHelpers.TryGetValue(name, out helper))
273-
{
274-
helper = new FastReflectionHelper();
275-
helper.PropertyName = name;
276-
_groupHelpers[name] = helper;
277-
}
278-
279-
var val = helper.GetPropertyValue(group);
269+
var val = group.GetPropertyValue(name);
280270
groupValues.Add(val);
281271
}
282272
var groupCount = 0;
283273

284-
FastReflectionHelper countHelper;
285-
if (!_groupHelpers.TryGetValue(groupingField, out countHelper))
286-
{
287-
countHelper = new FastReflectionHelper();
288-
countHelper.PropertyName = groupingField;
289-
_groupHelpers[groupingField] = countHelper;
290-
}
291-
292-
var countVal = countHelper.GetPropertyValue(group);
274+
var countVal = group.GetPropertyValue(groupingField);
293275
if (countVal != null)
294276
{
295277
groupCount = Convert.ToInt32(countVal);
@@ -751,4 +733,4 @@ internal class SQLiteDataSourceQueryResult
751733
public IList Data { get; set; }
752734
public int FullCount { get; set; }
753735
}
754-
}
736+
}

0 commit comments

Comments
 (0)