Readme
jcdcdev.Umbraco.Core
Core functionality used by my packages and projects
Useful Classes, Interfaces and Extensions
SimpleAccessRule
This class is used to create a simple access rules for user groups and sections.
var rule0 = SimpleAccessRule.AllowAdminGroup;
var rule1 = SimpleAccessRule.GrantBySection("mySection");
ContentAppBadges
This class is used to create badges for content apps.
var badge = ContentAppBadges.Alert(7);
HealthChecks
ConfigurationNotNullHealthcheck
This health check will verify that a configuration value is not null within an IOptions
object.
[HealthCheck(
"GUID",
"Name",
Description = "Description",
Group = "My Configuration",)]
internal class ApplicationKeyHealthCheck : ConfigurationNotNullHealthcheck<B2Options>
{
public ApplicationKeyHealthCheck(ILocalizedTextService textService, IOptions<B2Options> options) : base(textService, options)
{
}
public override string ItemPath => "Website:ApiKey";
public override string ReadMoreLink => Constants.HealthChecks.ApplicationKey.ReadMoreLink;
public override string CurrentValue => Options.ApplicationKey ?? string. Empty;
}