Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates a MatchedPairList from the specified XML string.
        /// </summary>
        /// <param name="xmlSrc">The XML source string to load.</param>
        /// <param name="wsName">Name of the writing system (used for error reporting).</param>
        /// ------------------------------------------------------------------------------------
        public static MatchedPairList Load(string xmlSrc, string wsName)
        {
            Exception       e;
            MatchedPairList list = XmlSerializationHelper.DeserializeFromString <MatchedPairList>(xmlSrc, out e);

            if (e != null)
            {
                throw new ContinuableErrorException("Invalid MatchedPairs field while loading the " +
                                                    wsName + " writing system.", e);
            }
            return(list ?? new MatchedPairList());
        }
Exemplo n.º 2
0
 public void FixtureSetup()
 {
     m_pairList = MatchedPairList.Load(kXml, "Test WS");
 }