/// <summary> /// dispose current state. /// </summary> public void Dispose() { if (m_Pushed) { LocalizationGroupStack.Pop(); } }
void initialize(System.Reflection.Assembly assembly) { string groupName = L10n.GetGroupName(assembly); LocalizationGroupStack.Push(groupName); m_Pushed = true; m_LocGroupName = groupName; }
void initialize(System.Reflection.Assembly assembly) { string groupName = null; object[] attrobjs = assembly.GetCustomAttributes(typeof(LocalizationAttribute), true /* inherit */); if (attrobjs != null && attrobjs.Length > 0 && attrobjs[0] != null) // focus on only the first. { LocalizationAttribute locAttr = (LocalizationAttribute)attrobjs[0]; groupName = locAttr.locGroupName; if (groupName == null) { groupName = assembly.GetName().Name; } } LocalizationGroupStack.Push(groupName); m_Pushed = true; m_LocGroupName = groupName; }