Skip to content

Commit faf87d6

Browse files
committed
Add NonGeneric methods on GriddlyResult
1 parent 8e1ac12 commit faf87d6

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

Build/CommonAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("1.7.1")]
19-
[assembly: AssemblyFileVersion("1.7.1")]
18+
[assembly: AssemblyVersion("1.7.2")]
19+
[assembly: AssemblyFileVersion("1.7.2")]
2020
//[assembly: AssemblyInformationalVersion("1.4.5-editlyalpha2")]

Griddly.Mvc/GriddlyResult.cs

+24-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ public SortField[] GetSortFields(NameValueCollection items)
3737
})
3838
.ToArray();
3939
}
40-
40+
41+
public abstract IEnumerable GetAllNonGeneric(SortField[] sortFields);
42+
43+
public abstract IList GetPageNonGeneric(int pageNumber, int pageSize, SortField[] sortFields);
44+
45+
public abstract void PopulateSummaryValuesNonGeneric(GriddlySettings settings);
46+
47+
public abstract long GetCount();
48+
4149
public abstract IEnumerable<P> GetAllForProperty<P>(string propertyName);
4250
}
4351

@@ -172,12 +180,25 @@ public override void ExecuteResult(ControllerContext context)
172180

173181
public abstract void PopulateSummaryValues(GriddlySettings<T> settings);
174182

175-
public abstract long GetCount();
176-
177183
public override IEnumerable<P> GetAllForProperty<P>(string propertyName)
178184
{
179185
throw new NotImplementedException();
180186
}
187+
188+
public override IEnumerable GetAllNonGeneric(SortField[] sortFields)
189+
{
190+
return GetAll(sortFields);
191+
}
192+
193+
public override IList GetPageNonGeneric(int pageNumber, int pageSize, SortField[] sortFields)
194+
{
195+
return (IList)(GetPage(pageNumber, pageSize, sortFields).ToList());
196+
}
197+
198+
public override void PopulateSummaryValuesNonGeneric(GriddlySettings settings)
199+
{
200+
PopulateSummaryValues((GriddlySettings<T>)settings);
201+
}
181202
}
182203

183204
public enum GriddlyExportFormat

0 commit comments

Comments
 (0)