This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
/
ActionDescriptor.cs
64 lines (53 loc) · 2.22 KB
/
ActionDescriptor.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Routing;
namespace Microsoft.AspNetCore.Mvc.Abstractions
{
public class ActionDescriptor
{
public ActionDescriptor()
{
Id = Guid.NewGuid().ToString();
Properties = new Dictionary<object, object>();
RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
/// <summary>
/// Gets an id which uniquely identifies the action.
/// </summary>
public string Id { get; }
/// <summary>
/// Gets or sets the collection of route values that must be provided by routing
/// for the action to be selected.
/// </summary>
public IDictionary<string, string> RouteValues { get; set; }
public AttributeRouteInfo AttributeRouteInfo { get; set; }
/// <summary>
/// The set of constraints for this action. Must all be satisfied for the action to be selected.
/// </summary>
public IList<IActionConstraintMetadata> ActionConstraints { get; set; }
/// <summary>
/// The set of parameters associated with this action.
/// </summary>
public IList<ParameterDescriptor> Parameters { get; set; }
/// <summary>
/// The set of properties which are model bound.
/// </summary>
public IList<ParameterDescriptor> BoundProperties { get; set; }
/// <summary>
/// The set of filters associated with this action.
/// </summary>
public IList<FilterDescriptor> FilterDescriptors { get; set; }
/// <summary>
/// A friendly name for this action.
/// </summary>
public virtual string DisplayName { get; set; }
/// <summary>
/// Stores arbitrary metadata properties associated with the <see cref="ActionDescriptor"/>.
/// </summary>
public IDictionary<object, object> Properties { get; set; }
}
}