sozsoft-platform/api/src/Sozsoft.Platform.Domain/BackgroundWorkers/PropertyTemplateContentContributor.cs
Sedat Öztürk 429227df1d Initial
2026-02-24 23:44:16 +03:00

23 lines
694 B
C#

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()
);
}
}