Skip to content

Commit

Permalink
Add NonGeneric methods on GriddlyResult
Browse files Browse the repository at this point in the history
  • Loading branch information
programcsharp committed Mar 7, 2017
1 parent 8e1ac12 commit faf87d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Build/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.7.1")]
[assembly: AssemblyFileVersion("1.7.1")]
[assembly: AssemblyVersion("1.7.2")]
[assembly: AssemblyFileVersion("1.7.2")]
//[assembly: AssemblyInformationalVersion("1.4.5-editlyalpha2")]
27 changes: 24 additions & 3 deletions Griddly.Mvc/GriddlyResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ public SortField[] GetSortFields(NameValueCollection items)
})
.ToArray();
}


public abstract IEnumerable GetAllNonGeneric(SortField[] sortFields);

public abstract IList GetPageNonGeneric(int pageNumber, int pageSize, SortField[] sortFields);

public abstract void PopulateSummaryValuesNonGeneric(GriddlySettings settings);

public abstract long GetCount();

public abstract IEnumerable<P> GetAllForProperty<P>(string propertyName);
}

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

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

public abstract long GetCount();

public override IEnumerable<P> GetAllForProperty<P>(string propertyName)
{
throw new NotImplementedException();
}

public override IEnumerable GetAllNonGeneric(SortField[] sortFields)
{
return GetAll(sortFields);
}

public override IList GetPageNonGeneric(int pageNumber, int pageSize, SortField[] sortFields)
{
return (IList)(GetPage(pageNumber, pageSize, sortFields).ToList());
}

public override void PopulateSummaryValuesNonGeneric(GriddlySettings settings)
{
PopulateSummaryValues((GriddlySettings<T>)settings);
}
}

public enum GriddlyExportFormat
Expand Down

0 comments on commit faf87d6

Please sign in to comment.