mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
using System;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Volo.Abp.TextTemplating
|
|
{
|
|
public class TemplateDefinition
|
|
{
|
|
public const string DefaultLayoutPlaceHolder = "_";
|
|
|
|
[NotNull]
|
|
public string Name { get; }
|
|
|
|
public bool IsLayout { get; }
|
|
|
|
[CanBeNull]
|
|
public string Layout { get; set; }
|
|
|
|
[CanBeNull]
|
|
public Type LocalizationResource { get; set; }
|
|
|
|
public TemplateContributorList Contributors { get; }
|
|
|
|
[CanBeNull]
|
|
public string DefaultCultureName { get; }
|
|
|
|
public TemplateDefinition(
|
|
[NotNull] string name,
|
|
[CanBeNull] Type localizationResource = null,
|
|
bool isLayout = false,
|
|
string layout = DefaultLayoutPlaceHolder,
|
|
string defaultCultureName = null)
|
|
{
|
|
Name = Check.NotNullOrWhiteSpace(name, nameof(name));
|
|
LocalizationResource = localizationResource;
|
|
Contributors = new TemplateContributorList();
|
|
IsLayout = isLayout;
|
|
Layout = layout;
|
|
DefaultCultureName = defaultCultureName;
|
|
}
|
|
|
|
public virtual TemplateDefinition AddContributor(ITemplateContributor contributor)
|
|
{
|
|
Contributors.Add(contributor);
|
|
return this;
|
|
}
|
|
}
|
|
}
|