Exemple #1
0
        internal protected virtual void Init(ThreadSession session, TaskSetting setting, Dictionary <string, string> parentData = null)
        {
            _session = session;
            _setting = setting;
            int msgId = _stepTimer.Runtimes + 1;

            SetRequestParam("MsgId", msgId);
            SetRequestParam("Sid", _session.Context.SessionId);
            SetRequestParam("Uid", _session.Context.UserId);
            SetRequestParam("ActionId", Action);
            foreach (var v in setting.childStepDic)
            {
                childDic.Add(v.Key, v.Value);
            }
            if (setting.StepParms.ContainsKey(Action))
            {
                foreach (var v in setting.StepParms[Action])
                {
                    SetRequestParam(v.Key, v.Value);
                }
            }
            if (parentData != null) // parent's data will override the config/init data.
            {
                foreach (var v in parentData)
                {
                    SetRequestParam(v.Key, v.Value);
                }
            }
        }
Exemple #2
0
        internal protected virtual void Init(ThreadSession session)
        {
            _session = session;
            int msgId = _stepTimer.Runtimes + 1;

            SetRequestParam("MsgId", msgId);
            SetRequestParam("Sid", _session.Context.SessionId);
            SetRequestParam("Uid", _session.Context.UserId);
            SetRequestParam("ActionId", Action);
        }
Exemple #3
0
 protected internal virtual void Init(ThreadSession session,TaskSetting setting,Dictionary<string,string> parentData=null)
 {
     _session = session;
     _setting = setting;
     int msgId = _stepTimer.Runtimes + 1;
     SetRequestParam("MsgId", msgId);
     SetRequestParam("Sid", _session.Context.SessionId);
     SetRequestParam("Uid", _session.Context.UserId);
     SetRequestParam("ActionId", Action);
     foreach(var v in setting.childStepDic)
     {
         childDic.Add(v.Key, v.Value);
     }
     if(setting.StepParms.ContainsKey(Action))
     {
         foreach(var v in setting.StepParms[Action])
         {
             SetRequestParam(v.Key, v.Value);
         }
     }
     if(parentData!=null) // parent's data will override the config/init data.
     {
         foreach(var v in parentData)
         {
             SetRequestParam(v.Key, v.Value);
         }
     }
 }
Exemple #4
0
 internal protected virtual void Init(ThreadSession session)
 {
     _session = session;
     int msgId = _stepTimer.Runtimes + 1;
     SetRequestParam("MsgId", msgId);
     SetRequestParam("Sid", _session.Context.SessionId);
     SetRequestParam("Uid", _session.Context.UserId);
     SetRequestParam("ActionId", Action);
 }