Exemplo 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());
        }
Exemplo 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));
     }
 }