sozsoft-platform/api/src/Sozsoft.Platform.Domain/BackgroundWorkers/PropertyTemplateContentContributor.cs

24 lines
694 B
C#
Raw Normal View History

2026-02-24 20:44:16 +00:00
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.TextTemplating;
namespace Sozsoft.Platform.BackgroundWorkers;
public class PropertyTemplateContentContributor : ITemplateContentContributor, ITransientDependency
{
public const string PropertyContentPropertyName = "PropertyContent";
public PropertyTemplateContentContributor()
{
}
public virtual async Task<string> GetOrNullAsync(TemplateContentContributorContext context)
{
return await Task.FromResult(
context.TemplateDefinition.Properties.GetValueOrDefault(PropertyContentPropertyName, null)?.ToString()
);
}
}