public ReactionResult OnChange(string entity, string key, string priorValue, string newValue, string on) { var result = new ReactionResult(); if (key == "proxa" && priorValue != string.Empty) { if (Convert.ToInt32(newValue) < 9 && Convert.ToInt32(priorValue) >= 11) { result.NewEvents = new List <NewEvent>() { new NewEvent() { Entities = new string [] { entity }, On = on, Type = "Feeder Refill" } }; } } return(result); }
public static RuntimeResult FromSuccess() { return(ReactionResult.FromSuccess(EnigmaReactions.Success)); }
public static RuntimeResult FromException() { return(ReactionResult.FromError(CommandError.Exception, null, EnigmaReactions.Exception)); }
public static RuntimeResult FromUnlocked() { return(ReactionResult.FromError(CommandError.UnmetPrecondition, null, EnigmaReactions.Success, EnigmaReactions.Unlocked)); }
public static RuntimeResult FromInvalidArgument(string reason) { return(ReactionResult.FromError(CommandError.ParseFailed, reason, EnigmaReactions.InvalidArgument)); }