protected void Action <TArgument, TResult>(string name, ref IActionContract <TArgument, TResult> contract, Func <TArgument, IPromise <TResult> > impl, bool noArgument = false) where TResult : class, IStringifiable, new() where TArgument : class, IStringifiable, new() { contract = new ActionContract <TArgument, TResult>(name, impl, noArgument); Actions.Add("name", contract); }
public static ActionContract <TArgument, TResult> Action <TArgument, TResult>( Dictionary <string, IActionContract> actions, string name, Func <TArgument, IPromise <TResult> > impl, bool noArgument = false) where TResult : class, IStringifiable, new() where TArgument : class, IStringifiable, new() { var contract = new ActionContract <TArgument, TResult>(name, impl, noArgument); actions.Add("name", contract); return(contract); }