public static double GetCurrency(Iso4217 to) { if (to != from) { return(Provider.Google.Rate(from, to) / 10000); } return(1); }
public PartialViewResult GetMovieDetails(int?id, Iso4217 currency) { return(PartialView("PartialMovieDetailsView", new PartialMovieDetailsViewModel() { Movie = _movieServiceGateway.Read(id.Value), CurrentCurrency = currency })); }
public PartialViewResult GetMoviesResult(int?id, Iso4217 currency) { if (id == null) { return(PartialView("PartialMovieView", new PartialViewModel() { Movies = _movieServiceGateway.ReadAll(), CurrentCurrency = currency })); } var genre = _genreServiceGateway.Read(id.Value); foreach (var movie in genre.Movies) { movie.Genre = genre; } return(PartialView("PartialMovieView", new PartialViewModel() { Movies = genre.Movies, CurrentCurrency = currency })); }
/// <exclude /> public static double Convert(this Provider provider, Iso4217 source, Iso4217 quote, double value) { var rate = Factory.Make(provider).Fetch(source, quote); return(new Calc(rate, value).Result); }
/// <exclude /> public static double Rate(this Provider provider, Iso4217 source, Iso4217 quote) { return(Factory.Make(provider).Fetch(source, quote).Value); }
/// <exclude /> public static Rate Fetch(this Provider provider, Iso4217 source, Iso4217 quote) { return(Factory.Make(provider).Fetch(source, quote)); }
/// <exclude /> public Rate Fetch(Iso4217 source, Iso4217 quote) { return(Fetch(new Pair(source.ToString(), quote.ToString()))); }