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    rate           = Fixer.Rate(inputCurrency, outputCurrency);
            double dblrate        = rate.Convert(1);

            Rate.Set(context, dblrate);
        }
示例#2
0
        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);
            double outputAmount   = Fixer.Convert(inputCurrency, outputCurrency, inputAmount);

            OutputAmount.Set(context, outputAmount);
        }