コード例 #1
0
        public void Assign(string exp, string value, bool throwsifnotexists, int update)
        {
            if (string.IsNullOrEmpty(exp))
            {
                return;
            }

            try
            {
                var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env);

                _env = envTemp;
                CommitAssign();
            }
            catch (Exception err)
            {
                var msg = err.Message;
                var msgWithVariableName = msg + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(exp) + " }";
                if (err is NullValueInVariableException variableException && err.Message.Contains("Scalar value "))
                {
                    throw new WarewolfExecutionEnvironmentException(err.Message);
                }
                if (throwsifnotexists)
                {
                    throw new WarewolfExecutionEnvironmentException(msgWithVariableName);
                }

                Errors.Add(msgWithVariableName);
            }
        }
コード例 #2
0
 public void AssignWithFrame(IAssignValue values, int update)
 {
     try
     {
         var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env);
         _env = envTemp;
     }
     catch (Exception err)
     {
         throw new WarewolfExecutionEnvironmentException(err.Message + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(values.Name) + " }");
     }
 }
コード例 #3
0
        public void Assign(string exp, string value, int update)
        {
            if (string.IsNullOrEmpty(exp))
            {
                return;
            }

            var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env);

            _env = envTemp;
            CommitAssign();
        }
コード例 #4
0
 public void AssignWithFrame(IAssignValue values, int update)
 {
     try
     {
         var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env);
         _env = envTemp;
     }
     catch (Exception err)
     {
         Errors.Add(err.Message);
         throw;
     }
 }
コード例 #5
0
        public void AssignWithFrame(IAssignValue values, int update)
        {
            try
            {
                if (string.IsNullOrEmpty(values.Name))
                {
                    return;
                }

                var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env);
                _env = envTemp;
            }
            catch (Exception err)
            {
                Errors.Add(err.Message);
                throw;
            }
        }
コード例 #6
0
        public void Assign(string exp, string value, int update)
        {
            if (string.IsNullOrEmpty(exp))
            {
                return;
            }
            try
            {
                var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env);

                _env = envTemp;
                CommitAssign();
            }
            catch (Exception err)
            {
                Errors.Add(err.Message);
            }
        }