LanguageManager(LanguageManagerSettingsImpl languageManagerSettings, [ImportMany] ILanguage[] languages, [ImportMany] ILanguageCreator[] creators) { this.languageManagerSettings = languageManagerSettings; var langs = new List<ILanguage>(languages); foreach (var creator in creators) langs.AddRange(creator.Create()); if (langs.Count == 0) langs.Add(new DummyLanguage()); this.languages = langs.OrderBy(a => a.OrderUI).ToArray(); this.language = FindOrDefault(languageManagerSettings.LanguageGuid); this.languageChanged = new WeakEventList<EventArgs>(); }
LanguageManager(LanguageManagerSettingsImpl languageManagerSettings, [ImportMany] ILanguage[] languages, [ImportMany] ILanguageCreator[] creators) { this.languageManagerSettings = languageManagerSettings; var langs = new List <ILanguage>(languages); foreach (var creator in creators) { langs.AddRange(creator.Create()); } if (langs.Count == 0) { langs.Add(new DummyLanguage()); } this.languages = langs.OrderBy(a => a.OrderUI).ToArray(); this.language = FindOrDefault(languageManagerSettings.LanguageGuid); this.languageChanged = new WeakEventList <EventArgs>(); }