Example #1
0
 private Session(Session session)
 {
     if (session != null)
     {
         this.name = session.name;
         this.records = new Dictionary<string, Record>(session.records);
         this.recordsList = new List<Record>(session.recordsList);
     }
     else
     {
         this.records = new Dictionary<string, Record>(10);
         this.recordsList = new List<Record>(10);
     }
 }
Example #2
0
 public void SaveCommand(string name, Dictionary<string, string> other)
 {
     isRead = false;
     addCommand = false;
     if (name == null && temps != null && temps.Count > 0)
     {
         name = (string)temps[1];
     }
     Session session = new Session(GetSaveName(name), false);
     for (IEnumerator<KeyValuePair<object, object>> it = setEnvironmentList.GetEnumerator(); it.MoveNext(); )
     {
         KeyValuePair<object, object> entry = it.Current;
         session.Add((String)entry.Key, (String)entry.Value);
     }
     session.Add("cmd_offsetPos", MathUtils.Min(offsetPos + 1, scriptSize));
     session.Add("cmd_cacheName", cacheCommandName);
     session.Add("cmd_nowPosFlagName", nowPosFlagName);
     session.Add("cmd_flaging", flaging);
     session.Add("cmd_ifing", ifing);
     session.Add("cmd_functioning", functioning);
     session.Add("cmd_esleflag", esleflag);
     session.Add("cmd_esleover", esleover);
     session.Add("cmd_backIfBool", backIfBool);
     session.Add("cmd_isInnerCommand", isInnerCommand);
     session.Add("cmd_isRead", isRead);
     session.Add("cmd_isCall", isCall);
     session.Add("cmd_if_bool", if_bool);
     session.Add("cmd_elseif_bool", elseif_bool);
     if (other != null)
     {
         for (IEnumerator<KeyValuePair<string, string>> it = other.GetEnumerator(); it.MoveNext(); )
         {
             KeyValuePair<string, string> entry = it.Current;
             session.Add(entry.Key, entry.Value);
         }
     }
     session.Save();
 }
Example #3
0
 public static Session LoadStringSession(string res)
 {
     Session session = new Session((Session)null);
     session.LoadEncodeSession(res);
     return session;
 }
Example #4
0
 public object Clone()
 {
     Session session = new Session(name);
     return session;
 }