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

get_EngineOrNull() public method

Get the actual writing system object for a given code, or returns NULL if one does not already exist. (Use get_Engine if you prefer to have an writing system created automatically if one does not already exist.)
public get_EngineOrNull ( int ws ) : ILgWritingSystem
ws int
return ILgWritingSystem
		public ILgWritingSystem get_EngineOrNull(int ws)
		{
			lock (m_syncRoot)
			{
				if (!m_handleWss.ContainsKey(ws))
					return null;
				return Get(ws);
			}
		}

Usage Example

        public void get_EngineOrNull()
        {
            var wsManager = new PalasoWritingSystemManager();

            Assert.IsNull(wsManager.get_EngineOrNull(1));
            IWritingSystem ws = wsManager.Set("en-US");

            Assert.AreSame(ws, wsManager.get_EngineOrNull(ws.Handle));
            wsManager.Save();
        }
All Usage Examples Of SIL.CoreImpl.PalasoWritingSystemManager::get_EngineOrNull