mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
Use EnumerateInvocationList instead of GetInvocationList (#2303)
This commit is contained in:
parent
13306e24ba
commit
03e728e129
24 changed files with 402 additions and 294 deletions
|
|
@ -117,7 +117,18 @@ public class Localization : IServiceType
|
|||
public void SetupWithFallbacks()
|
||||
{
|
||||
this.DalamudLanguageCultureInfo = CultureInfo.InvariantCulture;
|
||||
this.LocalizationChanged?.Invoke(FallbackLangCode);
|
||||
foreach (var d in Delegate.EnumerateInvocationList(this.LocalizationChanged))
|
||||
{
|
||||
try
|
||||
{
|
||||
d(FallbackLangCode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Exception during raise of {handler}", d.Method);
|
||||
}
|
||||
}
|
||||
|
||||
Loc.SetupWithFallbacks(this.assembly);
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +145,17 @@ public class Localization : IServiceType
|
|||
}
|
||||
|
||||
this.DalamudLanguageCultureInfo = GetCultureInfoFromLangCode(langCode);
|
||||
this.LocalizationChanged?.Invoke(langCode);
|
||||
foreach (var d in Delegate.EnumerateInvocationList(this.LocalizationChanged))
|
||||
{
|
||||
try
|
||||
{
|
||||
d(langCode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Exception during raise of {handler}", d.Method);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue