Skip to content

Instantly share code, notes, and snippets.

@lahma
Last active October 26, 2018 16:21
Show Gist options
  • Select an option

  • Save lahma/557ce52c4adf3bfb2cbea2e1b4e558ef to your computer and use it in GitHub Desktop.

Select an option

Save lahma/557ce52c4adf3bfb2cbea2e1b4e558ef to your computer and use it in GitHub Desktop.
public class DocumentTransformer : AbstractTransformerCreationTask<Document>
{
public class Result
{
public string Id { get; set; }
public string[] ExtractedIds { get; set; }
}
public DocumentTransformer()
{
TransformResults = docs => from doc in docs
select new Result
{
Id = doc.Id,
ExtractedIds = doc.SomeCollection.ToArray(),
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment