Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A custom implementation of the Sitecore IIntelResultTransformer to transform a DateTable with some useful properties
public class SampleOrderResultTransformer : IIntelResultTransformer, IResultTransformer<DataTable>
{
private ResultSetExtender resultSetExtender;
public SampleOrderResultTransformer()
{
this.resultSetExtender = ClientFactory.Instance.GetResultSetExtender();
}
public SampleOrderResultTransformer(ResultSetExtender resultSetExtender)
{
this.resultSetExtender = resultSetExtender;
}
public object Transform(ResultSet<DataTable> resultSet)
{
Assert.ArgumentNotNull((object) resultSet, "resultSet");
this.resultSetExtender.AddRecency(resultSet, "VisitStartDateTime");
return (object) resultSet;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.