コード例 #1
0
        public void parseTest5()
        {
            uvariable.unsetAll();
            Script target = new Script(env, uvariable);

            target.parse("#[( 2 < 1) { #[var name = value] } else { #[var name = value2] }]");
            Assert.AreEqual(1, uvariable.Variables.Count());
            foreach (TUserVariable uvar in uvariable.Variables)
            {
                Assert.AreEqual(uvar.ident, "name");
                Assert.AreEqual(uvar.unevaluated, "value2");
            }
        }
コード例 #2
0
        /// <summary>
        /// 'POST' of the solution.
        /// Called when a build is completed.
        /// </summary>
        /// <param name="fSucceeded">true if no update actions failed.</param>
        /// <param name="fModified">true if any update action succeeded.</param>
        /// <param name="fCancelCommand">true if update actions were canceled.</param>
        /// <returns>If the method succeeds, it returns Codes.Success. If it fails, it returns an error code.</returns>
        public int onPost(int fSucceeded, int fModified, int fCancelCommand)
        {
            try
            {
                int ret = Action.bindPost(fSucceeded, fModified, fCancelCommand);
                if (Action.reset())
                {
                    uvariable.unsetAll();
                }

                clientLib.Event.onPost(fSucceeded, fModified, fCancelCommand);
                return(ret);
            }
            catch (Exception ex) {
                Log.Error("Failed Solution.Post-binding: '{0}'", ex.Message);
            }
            return(Codes.Failed);
        }