diff --git a/DigitalData.Core.API/DIExtensions.cs b/DigitalData.Core.API/DIExtensions.cs
index 02b4c25..3a6fa68 100644
--- a/DigitalData.Core.API/DIExtensions.cs
+++ b/DigitalData.Core.API/DIExtensions.cs
@@ -19,5 +19,33 @@ namespace DigitalData.Core.API
/// The application builder with the CSP middleware added.
public static IApplicationBuilder UseCSPMiddleware(this IApplicationBuilder app, string policy)
=> app.UseMiddleware(policy);
+
+ ///
+ /// Checks if the DiP (Development in Production) mode is enabled for the WebApplicationBuilder.
+ ///
+ /// The WebApplicationBuilder instance.
+ /// True if DiP mode is enabled; otherwise, false.
+ public static bool IsDiP(this WebApplicationBuilder builder) => builder.Configuration.GetValue("DiPMode");
+
+ ///
+ /// Checks if the DiP (Development in Production) mode is enabled for the WebApplication.
+ ///
+ /// The WebApplication instance.
+ /// True if DiP mode is enabled; otherwise, false.
+ public static bool IsDiP(this WebApplication app) => app.Configuration.GetValue("DiPMode");
+
+ ///
+ /// Checks if the environment is Development or DiP (Development in Production) mode is enabled for the WebApplicationBuilder.
+ ///
+ /// The WebApplicationBuilder instance.
+ /// True if the environment is Development or DiP mode is enabled; otherwise, false.
+ public static bool IsDevOrDiP(this WebApplicationBuilder builder) => builder.Environment.IsDevelopment() || builder.IsDiP();
+
+ ///
+ /// Checks if the environment is Development or DiP (Development in Production) mode is enabled for the WebApplication.
+ ///
+ /// The WebApplication instance.
+ /// True if the environment is Development or DiP mode is enabled; otherwise, false.
+ public static bool IsDevOrDiP(this WebApplication app) => app.Environment.IsDevelopment() || app.IsDiP();
}
}
\ No newline at end of file