Esempio n. 1
0
    public bool SetCurData(string[] keyNames, string[] keyValues)
    {
        for (int i = 0; i < keyNames.Length; ++i)
        {
            if (keyValues [i] == NONE_DATA_KEY.ToString())
            {
                return(false);
            }
        }

        curNode = _data.Find(
            delegate(XmlNode node) {
            bool _matchResult = true;
            for (int i = 0; i < keyNames.Length; ++i)
            {
                _matchResult &= node.Attributes.GetNamedItem(keyNames [i]).Value == keyValues [i];
            }
            return(_matchResult);
        });
        if (curNode == null)
        {
            Debug.LogError(string.Format(exceptionMessageFormat, this.ToString(), keyValues [0]));
            return(false);
        }
        return(true);
    }