SIL.CoreImpl.PalasoWritingSystemManager.get_CharPropEngine C# (CSharp) Method

get_CharPropEngine() public method

Get the char prop engine for a particular WS
public get_CharPropEngine ( int ws ) : ILgCharacterPropertyEngine
ws int
return ILgCharacterPropertyEngine
		public ILgCharacterPropertyEngine get_CharPropEngine(int ws)
		{
			return Get(ws).CharPropEngine;
		}

Usage Example

        public void get_CharPropEngine()
        {
            var            wsManager = new PalasoWritingSystemManager();
            IWritingSystem ws        = wsManager.Set("zh-CN");

            ws.ValidChars = "<?xml version=\"1.0\" encoding=\"utf-16\"?>"
                            + "<ValidCharacters><WordForming>e\uFFFCf\uFFFCg\uFFFCh\uFFFC'</WordForming>"
                            + "<Numeric>4\uFFFC5</Numeric>"
                            + "<Other>,\uFFFC!\uFFFC*</Other>"
                            + "</ValidCharacters>";
            ILgCharacterPropertyEngine cpe = wsManager.get_CharPropEngine(ws.Handle);

            Assert.IsNotNull(cpe);
            Assert.IsTrue(cpe.get_IsWordForming('\''));
            Assert.IsFalse(cpe.get_IsWordForming('"'));
            Assert.AreEqual(0x0804, cpe.Locale);

            ws.ValidChars = null;
            cpe           = wsManager.get_CharPropEngine(ws.Handle);
            Assert.IsNotNull(cpe);
            Assert.IsFalse(cpe.get_IsWordForming('\''));
            Assert.IsFalse(cpe.get_IsWordForming('"'));
            Assert.AreEqual(0x0804, cpe.Locale);
            wsManager.Save();
        }
All Usage Examples Of SIL.CoreImpl.PalasoWritingSystemManager::get_CharPropEngine