So in my LaorWare2011Web project I have a folder named RemoteCalls and in there is a class called MemberBalanceCalculator defined as follows:
namespace LaborWare2011Web.RemoteCalls
{
public static class MemberBalanceCalculator
{
[AllowRpc]
public static object CalculateAmountOwing(Member member)
{
// a bunch of calculations.......
return member;
}
}
}
In my MemberEditViewModel class, I have a method that will call this remote method.
public void CalculateBalance()
{
string typeName = "LaborWare2011Web.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web";
string methodName = "CalculateAmountOwing";
var op = Mgr.InvokeServerMethodAsync(typeName, methodName, null, CurrentMember);
op.Completed += (o, args) => {
};
}