public virtual bool Meet(IEventArgs args) { if (value.IsNull()) { if (con.Equals("==")) { return(!para.IsNotNull(args)); } else { if (con.Equals("<>")) { return(para.IsNotNull(args)); } } } IPara source = para.GetSourcePara(args); if (source != null) { IPara target = value.GetTargetPara(args, source); try { bool r = source.Meet(con, target); target.Recycle(); return(r); } catch (Exception e) { throw new GameConfigExpception(para.ToString() + con + value.ToString() + " is not valid.\n" + ExceptionUtil.GetExceptionContent(e)); } } return(false); }
private void RemoveArg(FuncArg fa, IEventArgs args) { if (fa != null) { string t = fa.GetType(); if ("string".Equals(t) || "int".Equals(t) || "bool".Equals(t) || "float".Equals(t) || "long".Equals(t) || "double".Equals(t)) { IPara p = args.GetDefault().GetParameters().Get("arg_" + fa.GetName()); p.Recycle(); p = args.GetDefault().GetParameters().Get(fa.GetName()); p.Recycle(); args.GetDefault().GetParameters().Resume("arg_" + fa.GetName()); args.GetDefault().GetParameters().Resume(fa.GetName()); } else { ((BaseEventArgs)args).Resume(fa.GetName()); } } }
public virtual void Op(IEventArgs args) { IPara s = source.GetSourcePara(args); IPara tt1 = t1.GetTargetPara(args, s); if (t2 == null) { s.SetValue("=", tt1); } else { IPara tt2 = t2.GetTargetPara(args, s); IPara temp = (IPara)s.Borrow(); temp.SetValue("=", tt1); temp.SetValue(op, tt2); s.SetValue("=", temp); temp.Recycle(); tt2.Recycle(); } tt1.Recycle(); }