-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
IApplicationModelProvider.cs
43 lines (39 loc) · 2.06 KB
/
IApplicationModelProvider.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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.AspNetCore.Mvc.ApplicationModels;
/// <summary>
/// Builds or modifies an <see cref="ApplicationModel"/> for action discovery.
/// </summary>
public interface IApplicationModelProvider
{
/// <summary>
/// Gets the order value for determining the order of execution of providers. Providers execute in
/// ascending numeric value of the <see cref="Order"/> property.
/// </summary>
/// <remarks>
/// <para>
/// Providers are executed in an ordering determined by an ascending sort of the <see cref="Order"/> property.
/// A provider with a lower numeric value of <see cref="Order"/> will have its
/// <see cref="OnProvidersExecuting"/> called before that of a provider with a higher numeric value of
/// <see cref="Order"/>. The <see cref="OnProvidersExecuted"/> method is called in the reverse ordering after
/// all calls to <see cref="OnProvidersExecuting"/>. A provider with a lower numeric value of
/// <see cref="Order"/> will have its <see cref="OnProvidersExecuted"/> method called after that of a provider
/// with a higher numeric value of <see cref="Order"/>.
/// </para>
/// <para>
/// If two providers have the same numeric value of <see cref="Order"/>, then their relative execution order
/// is undefined.
/// </para>
/// </remarks>
int Order { get; }
/// <summary>
/// Executed for the first pass of <see cref="ApplicationModel"/> building. See <see cref="Order"/>.
/// </summary>
/// <param name="context">The <see cref="ApplicationModelProviderContext"/>.</param>
void OnProvidersExecuting(ApplicationModelProviderContext context);
/// <summary>
/// Executed for the second pass of <see cref="ApplicationModel"/> building. See <see cref="Order"/>.
/// </summary>
/// <param name="context">The <see cref="ApplicationModelProviderContext"/>.</param>
void OnProvidersExecuted(ApplicationModelProviderContext context);
}