示例#1
0
        public bool ContainsName(string instanceNameWithIndices)
        {
            string str;

            SymbolParser.ArrayIndexType type;
            IList <int[]> list;
            string        indicesStr = null;

            return(SymbolParser.TryParseArrayElement(instanceNameWithIndices, out str, out indicesStr, out list, out type) && ((StringComparer.OrdinalIgnoreCase.Compare(str, this._arrayInstance.InstanceName) == 0) && ArrayIndexConverter.TryCheckIndices(list, this._arrayType)));
        }
示例#2
0
        public bool Contains(string instancePath)
        {
            SymbolParser.ArrayIndexType type;
            if (!instancePath.StartsWith(this._arrayInstance.InstancePath, StringComparison.OrdinalIgnoreCase))
            {
                return(false);
            }
            IList <int[]> jaggedIndices = null;

            return(SymbolParser.TryParseIndices(instancePath.Substring(this._arrayInstance.InstancePath.Length), out jaggedIndices, out type) && ArrayIndexConverter.TryCheckIndices(jaggedIndices, this._arrayType));
        }