mirror of https://github.com/abpframework/abp.git
10 changed files with 176 additions and 144 deletions
@ -1,12 +1,9 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using JetBrains.Annotations; |
|
||||
|
|
||||
namespace Volo.Abp.TextTemplating |
namespace Volo.Abp.TextTemplating |
||||
{ |
{ |
||||
public interface ITemplateContentContributor |
public interface ITemplateContentContributor |
||||
{ |
{ |
||||
void Initialize(TemplateContentContributorInitializationContext context); |
Task<string> GetOrNullAsync(TemplateContentContributorContext context); |
||||
|
|
||||
Task<string> GetOrNullAsync([CanBeNull] string cultureName); |
|
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
using System; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Abp.TextTemplating |
||||
|
{ |
||||
|
public class TemplateContentContributorContext |
||||
|
{ |
||||
|
[NotNull] |
||||
|
public TemplateDefinition TemplateDefinition { get; } |
||||
|
|
||||
|
[NotNull] |
||||
|
public IServiceProvider ServiceProvider { get; } |
||||
|
|
||||
|
[CanBeNull] |
||||
|
public string Culture { get; } |
||||
|
|
||||
|
public TemplateContentContributorContext( |
||||
|
[NotNull] TemplateDefinition templateDefinition, |
||||
|
[NotNull] IServiceProvider serviceProvider, |
||||
|
[CanBeNull] string culture) |
||||
|
{ |
||||
|
TemplateDefinition = Check.NotNull(templateDefinition, nameof(templateDefinition)); |
||||
|
ServiceProvider = Check.NotNull(serviceProvider, nameof(serviceProvider)); |
||||
|
Culture = culture; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue