Skip to content

Instantly share code, notes, and snippets.

@MarcBruins
Created October 14, 2017 11:10
Show Gist options
  • Save MarcBruins/521db57517e3737858dcb9d8a8343bed to your computer and use it in GitHub Desktop.
Save MarcBruins/521db57517e3737858dcb9d8a8343bed to your computer and use it in GitHub Desktop.
MyDataFetcher.cs
public class MyDataFetcher : IDataFetcher
{
private MapsPlaceAutoComplete autoCompleteMaps = new MapsPlaceAutoComplete();
public async Task PerformFetch(MBAutoCompleteTextField textfield, Action<ICollection<string>> completionHandler)
{
var result = await autoCompleteMaps.AutoComplete(textfield.Text);
var strings = result.Select(rs => rs.description).ToList();
completionHandler(strings);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment