committed by
GitHub
12 changed files with 114 additions and 39 deletions
@ -1,13 +1,21 @@ |
|||
using LINGYUN.Abp.LocalizationManagement.Localization; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.EventBus.Local; |
|||
|
|||
namespace LINGYUN.Abp.LocalizationManagement; |
|||
|
|||
public abstract class LocalizationAppServiceBase : ApplicationService |
|||
{ |
|||
protected ILocalEventBus LocalEventBus => LazyServiceProvider.LazyGetService<ILocalEventBus>(); |
|||
protected LocalizationAppServiceBase() |
|||
{ |
|||
LocalizationResource = typeof(LocalizationManagementResource); |
|||
ObjectMapperContext = typeof(AbpLocalizationManagementApplicationModule); |
|||
} |
|||
|
|||
protected async virtual Task PublishDynamicLocalizationRefreshEvent<TEvent>(TEvent @event) |
|||
{ |
|||
await LocalEventBus?.PublishAsync(@event.GetType(), @event); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,45 @@ |
|||
namespace LINGYUN.Abp.LocalizationManagement; |
|||
|
|||
public class DynamicLanguageRefreshEventData |
|||
{ |
|||
public string CultureName { get; set; } |
|||
public DynamicLanguageRefreshEventData() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public DynamicLanguageRefreshEventData(string cultureName) |
|||
{ |
|||
CultureName = cultureName; |
|||
} |
|||
} |
|||
|
|||
public class DynamicResourceRefreshEventData |
|||
{ |
|||
public string ResourceName { get; set; } |
|||
public DynamicResourceRefreshEventData() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public DynamicResourceRefreshEventData(string resourceName) |
|||
{ |
|||
ResourceName = resourceName; |
|||
} |
|||
} |
|||
|
|||
public class DynamicTextRefreshEventData |
|||
{ |
|||
public string ResourceName { get; set; } |
|||
public string CultureName { get; set; } |
|||
public DynamicTextRefreshEventData() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public DynamicTextRefreshEventData(string resourceName, string cultureName) |
|||
{ |
|||
ResourceName = resourceName; |
|||
CultureName = cultureName; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue