ApplicationBuilderExtensions class
Namespace: Vitreous.DevUI.Extensions
Assembly: Vitreous.DevUI.dll
Extension methods to register and enable the Vitreous Developer UI.
public static class ApplicationBuilderExtensionsInheritance
Section titled “Inheritance”object ← ApplicationBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”AddVitreousDevUI(IServiceCollection, Action<VitreousDevUIOptions>?)
Section titled “ AddVitreousDevUI(IServiceCollection, Action<VitreousDevUIOptions>?)”Registers Vitreous DevUI services in the DI container.
Call this in builder.Services before builder.Build().
[RequiresUnreferencedCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")][RequiresDynamicCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")]public static IServiceCollection AddVitreousDevUI(this IServiceCollection services, Action<VitreousDevUIOptions>? configure = null)Parameters
Section titled “Parameters”services IServiceCollection
configure Action<VitreousDevUIOptions>?
Returns
Section titled “Returns”Remarks
Section titled “Remarks”Registering the services is safe in every environment: nothing is traced until
UseVitreousDevUI or MapVitreousDevUI activates the UI, which by
default only happens in Development (see Enabled).
MapVitreousDevUI(IEndpointRouteBuilder, string?)
Section titled “ MapVitreousDevUI(IEndpointRouteBuilder, string?)”Maps the Vitreous Developer UI endpoints under pathPrefix (default:
PathPrefix) and activates tracing — when
Enabled allows it (by default, only in the
Development environment). Otherwise no endpoints are mapped.
[RequiresUnreferencedCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")][RequiresDynamicCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")]public static RouteGroupBuilder MapVitreousDevUI(this IEndpointRouteBuilder endpoints, string? pathPrefix = null)Parameters
Section titled “Parameters”endpoints IEndpointRouteBuilder
pathPrefix string?
Returns
Section titled “Returns”The route group, so endpoint conventions apply to every DevUI endpoint, e.g.
app.MapVitreousDevUI().RequireAuthorization().
UseVitreousDevUI(IApplicationBuilder)
Section titled “ UseVitreousDevUI(IApplicationBuilder)”Enables the Vitreous Developer UI as middleware at the configured path prefix and
activates tracing — when Enabled allows it (by default,
only in the Development environment). Otherwise this does nothing.
[RequiresUnreferencedCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")][RequiresDynamicCode("Vitreous.DevUI is a development tool that serializes arbitrary messages with reflection. Leave it out of trimmed and Native AOT builds.")]public static IApplicationBuilder UseVitreousDevUI(this IApplicationBuilder app)Parameters
Section titled “Parameters”Returns
Section titled “Returns”Remarks
Section titled “Remarks”To protect the UI with authorization, use MapVitreousDevUI instead:
app.MapVitreousDevUI().RequireAuthorization("Admins");