From f11d717522489e141fa3929ed6262373a4b5e005 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Thu, 14 Jul 2022 16:48:01 +0200 Subject: [PATCH] Add RuntimeModeValidatorCollection and builder --- .../Runtime/RuntimeModeValidatorCollection.cs | 10 ++++++++++ .../Runtime/RuntimeModeValidatorCollectionBuilder.cs | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollection.cs create mode 100644 src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollectionBuilder.cs diff --git a/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollection.cs b/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollection.cs new file mode 100644 index 0000000000..97f25f3b8f --- /dev/null +++ b/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollection.cs @@ -0,0 +1,10 @@ +using Umbraco.Cms.Core.Composing; + +namespace Umbraco.Cms.Infrastructure.Runtime; + +public class RuntimeModeValidatorCollection : BuilderCollectionBase +{ + public RuntimeModeValidatorCollection(Func> items) + : base(items) + { } +} diff --git a/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollectionBuilder.cs b/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollectionBuilder.cs new file mode 100644 index 0000000000..4c755a6040 --- /dev/null +++ b/src/Umbraco.Infrastructure/Runtime/RuntimeModeValidatorCollectionBuilder.cs @@ -0,0 +1,11 @@ +using Microsoft.Extensions.DependencyInjection; +using Umbraco.Cms.Core.Composing; + +namespace Umbraco.Cms.Infrastructure.Runtime; + +public class RuntimeModeValidatorCollectionBuilder : SetCollectionBuilderBase +{ + protected override ServiceLifetime CollectionLifetime => ServiceLifetime.Transient; + + protected override RuntimeModeValidatorCollectionBuilder This => this; +}