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

GetWsFromStr() public method

Gets the HVO from the RFC5646 identifier.
public GetWsFromStr ( string identifier ) : int
identifier string The identifier.
return int
		public int GetWsFromStr(string identifier)
		{
			IWritingSystem ws;
			if (TryGet(identifier, out ws))
				return ws.Handle;
			return 0;
		}

Usage Example

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

            Assert.AreEqual(0, wsManager.GetWsFromStr("en-US"));
            IWritingSystem ws = wsManager.Set("en-US");

            Assert.AreEqual(ws.Handle, wsManager.GetWsFromStr("en-US"));
            wsManager.Save();
        }
All Usage Examples Of SIL.CoreImpl.PalasoWritingSystemManager::GetWsFromStr