/
SpaPrerenderingOptions.cs
46 lines (40 loc) · 1.75 KB
/
SpaPrerenderingOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SpaServices.Prerendering;
using System;
using System.Collections.Generic;
#nullable disable
namespace Microsoft.AspNetCore.Builder
{
/// <summary>
/// Represents options for the SPA prerendering middleware.
/// </summary>
[Obsolete("Prerendering is no longer supported out of box")]
public class SpaPrerenderingOptions
{
/// <summary>
/// Gets or sets an <see cref="ISpaPrerendererBuilder"/> that the prerenderer will invoke before
/// looking for the boot module file.
///
/// This is only intended to be used during development as a way of generating the JavaScript boot
/// file automatically when the application runs. This property should be left as <c>null</c> in
/// production applications.
/// </summary>
public ISpaPrerendererBuilder BootModuleBuilder { get; set; }
/// <summary>
/// Gets or sets the path, relative to your application root, of the JavaScript file
/// containing prerendering logic.
/// </summary>
public string BootModulePath { get; set; }
/// <summary>
/// Gets or sets an array of URL prefixes for which prerendering should not run.
/// </summary>
public string[] ExcludeUrls { get; set; }
/// <summary>
/// Gets or sets a callback that will be invoked during prerendering, allowing you to pass additional
/// data to the prerendering entrypoint code.
/// </summary>
public Action<HttpContext, IDictionary<string, object>> SupplyData { get; set; }
}
}