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

TryGetOrSet() public method

Gets the specified writing system if it exists, otherwise it creates a writing system using the specified identifier and sets it.
public TryGetOrSet ( string identifier, IWritingSystem &ws ) : bool
identifier string The identifier.
ws IWritingSystem The writing system.
return bool
		public bool TryGetOrSet(string identifier, out IWritingSystem ws)
		{
			lock (m_syncRoot)
			{
				ws = null;
				//if (LangTagUtils.IsScriptCodeValid(identifier))
				if (Exists(identifier) || (m_globalStore != null && m_globalStore.Contains(identifier)))
				{
					GetOrSet(identifier, out ws);
					if (ws != null)
						return true;
				}

				return false;
			}
		}