Skip to content

Instantly share code, notes, and snippets.

@nuitsjp
Created August 12, 2016 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuitsjp/5eb2bc935649f2ff370829fbf06654fd to your computer and use it in GitHub Desktop.
Save nuitsjp/5eb2bc935649f2ff370829fbf06654fd to your computer and use it in GitHub Desktop.
コラム01:PrismとDIコンテナ 03.疎結合
public class HatPepper
{
private readonly IGeolocationService _geolocationService;
public HatPepper(IGeolocationService geolocationService)
{
_geolocationService = geolocationService;
}
public IList<Shop> SearchShops()
{
var location = _geolocationService.GetCurrentLocation();
// 以降、取得した位置情報から周辺の店舗を取得して返却する
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment