Skip to content

Instantly share code, notes, and snippets.

@thiagoloureiro
Last active March 7, 2018 17:01
Show Gist options
  • Select an option

  • Save thiagoloureiro/e7f8b6e67d15b0b9e87bc09efd11e7d5 to your computer and use it in GitHub Desktop.

Select an option

Save thiagoloureiro/e7f8b6e67d15b0b9e87bc09efd11e7d5 to your computer and use it in GitHub Desktop.
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