singrdk/base/Applications/BounceBackTest/CalculatorContract.sg

27 lines
684 B
Plaintext
Raw Permalink Normal View History

2008-11-17 18:29:00 -05:00
using System;
using Microsoft.SingSharp;
using Microsoft.Singularity.Channels;
using Microsoft.Singularity.Directory;
namespace Microsoft.Singularity.Applications
{
public contract CalculatorContract : ServiceContract {
out message Success();
in message AddInteger(int first, int second);
out message IntegerResult(int answer);
in message SubtractInteger(int first, int second);
override state Start: one {
Success! -> Ready;
}
state Ready: one {
AddInteger? -> IntegerResult! -> Ready;
SubtractInteger? -> IntegerResult! -> Ready;
}
}
}