System.Xml.XmlBinaryReaderSession.TryLookup C# (CSharp) Method

TryLookup() public method

public TryLookup ( System value, System &result ) : bool
value System
result System
return bool
        public bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString result) { throw null; }
    }

Same methods

XmlBinaryReaderSession::TryLookup ( XmlDictionaryString value, XmlDictionaryString &result ) : bool
XmlBinaryReaderSession::TryLookup ( int key, System &result ) : bool
XmlBinaryReaderSession::TryLookup ( int key, XmlDictionaryString &result ) : bool
XmlBinaryReaderSession::TryLookup ( string value, System &result ) : bool
XmlBinaryReaderSession::TryLookup ( string value, XmlDictionaryString &result ) : bool

Usage Example

Esempio n. 1
0
        public string GetValue(IXmlDictionary staticDictionary, XmlBinaryReaderSession readerSession)
        {
            int id = this.DictionaryId / 2;
            XmlDictionaryString dicString = XmlDictionaryString.Empty;
            bool found;
            if (this.IsSession)
            {
                if (readerSession == null)
                {
                    return null;
                }

                found = readerSession.TryLookup(id, out dicString);
            }
            else
            {
                if (staticDictionary == null)
                {
                    return null;
                }

                found = staticDictionary.TryLookup(id, out dicString);
            }

            if (found)
            {
                return dicString.Value;
            }
            else
            {
                throw new ArgumentException("Cannot find value for dictionary string with ID = " + this.DictionaryId);
            }
        }
All Usage Examples Of System.Xml.XmlBinaryReaderSession::TryLookup