Esempio n. 1
0
        public override CommandResult InnerApply(IFunctionsStorage storage)
        {
            if (!storage.ContainsFunctions(this.name))
            {
                return(this.Failure("Function with this name is missing"));
            }

            storage.DeleteFunction(this.name);
            return(this.Success());
        }
Esempio n. 2
0
 public override CommandResult Apply(IFunctionsStorage storage)
 {
     try
     {
         if (!storage.ContainsFunctions(this.name))
         {
             return(this.Failure("Function with this name is missing"));
         }
         storage.DeleteFunction(this.name);
         return(this.Success());
     }
     catch (Exception e)
     {
         return(Failure(e.Message + e.TargetSite));
     }
 }