Last active
December 4, 2017 06:07
-
-
Save 15mgm15/675f42877c4e1dbde792fec37576fdc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UnitTestViewModel | |
{ | |
public Command LoadDataCommand { get; set; } | |
public string Data { get; set; } | |
readonly IDependencyService _dependencyService; | |
public UnitTestViewModel() : this(new DependencyServiceWrapper()) | |
{ | |
} | |
public UnitTestViewModel(IDependencyService dependencyService) | |
{ | |
_dependencyService = dependencyService; | |
LoadDataCommand = new Command(async () => await LoadData()); | |
} | |
public async Task LoadData() | |
{ | |
Data = await _dependencyService.Get<IDeliverServerSideData>().GetJsonData(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment