Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static RuntimeResult FromSuccess()
 {
     return(ReactionResult.FromSuccess(EnigmaReactions.Success));
 }
Beispiel #3
0
 public static RuntimeResult FromException()
 {
     return(ReactionResult.FromError(CommandError.Exception, null, EnigmaReactions.Exception));
 }
Beispiel #4
0
 public static RuntimeResult FromUnlocked()
 {
     return(ReactionResult.FromError(CommandError.UnmetPrecondition, null, EnigmaReactions.Success, EnigmaReactions.Unlocked));
 }
Beispiel #5
0
 public static RuntimeResult FromInvalidArgument(string reason)
 {
     return(ReactionResult.FromError(CommandError.ParseFailed, reason, EnigmaReactions.InvalidArgument));
 }