コード例 #1
0
ファイル: LanguageManager.cs プロジェクト: levisre/dnSpy
		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>();
		}
コード例 #2
0
        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>();
        }