protected override void Execute(CodeActivityContext context) { var aPIKey = APIKey.Get(context); Fixer.SetApiKey(aPIKey); var inputCurrency = InputCurrency.Get(context); var outputCurrency = OutputCurrency.Get(context); var pastDate = PastDate.Get(context); var rate = Fixer.Rate(inputCurrency, outputCurrency, pastDate); double dblrate = rate.Convert(1); Rate.Set(context, dblrate); }
protected override void Execute(CodeActivityContext context) { var aPIKey = APIKey.Get(context); Fixer.SetApiKey(aPIKey); var inputAmount = InputAmount.Get(context); var inputCurrency = InputCurrency.Get(context); var outputCurrency = OutputCurrency.Get(context); var pastDate = PastDate.Get(context); double outputAmount = Fixer.Convert(inputCurrency, outputCurrency, inputAmount, pastDate); OutputAmount.Set(context, outputAmount); }