Last active
March 7, 2018 17:01
-
-
Save thiagoloureiro/e7f8b6e67d15b0b9e87bc09efd11e7d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| using Orleans; | |
| using ConverterContracts; | |
| using System.Threading.Tasks; | |
| namespace ConverterGrain | |
| { | |
| /// <summary> | |
| /// Grain implementation class ConverterGrain. | |
| /// </summary> | |
| public class ConverterGrain : Grain, IConverter | |
| { | |
| public Task<double> ConvertToKm(double value) | |
| { | |
| var result = value * 1.6; | |
| return Task.FromResult(result); | |
| } | |
| public Task<double> ConvertToMile(double value) | |
| { | |
| var result = value / 1.6; | |
| return Task.FromResult(result); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment