private List <string> ChoiceDicitionary(ShareString.Type type) { if (type >= (ShareString.Type) this.m_string_types.Count) { return((List <string>)null); } return(this.m_string_types[(int)type]); }
public string Get(ShareString.Type type, short index) { List <string> stringList = this.ChoiceDicitionary(type); if ((int)index == -1 || (int)index >= stringList.Count) { return(string.Empty); } return(stringList[(int)index]); }
public short Set(ShareString.Type type, string val) { if (string.IsNullOrEmpty(val)) { return(-1); } List <string> stringList = this.ChoiceDicitionary(type); short num = (short)stringList.IndexOf(val); if ((int)num == -1) { if (stringList.Count >= (int)short.MaxValue) { DebugUtility.LogError("The registered character has exceeded the prescribed value. ShareString.Type = " + (object)type + ", Please change short to int."); } num = (short)stringList.Count; stringList.Add(val); } return(num); }
public void Clear() { this.mIndexs = (short[])null; this.mType = ShareString.Type.QuestParam_cond; }
public ShareStringList(ShareString.Type type) { this.mType = type; }