Add sealed and inherited to attributes
[Route] is intentionally not inherited
This commit is contained in:
parent
db0d065b76
commit
321db9d99f
|
|
@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
public static System.Action<Microsoft.AspNetCore.Components.UIEventArgs> SetValueHandler(System.Action<string> setter, string existingValue) { throw null; }
|
||||
public static System.Action<Microsoft.AspNetCore.Components.UIEventArgs> SetValueHandler<T>(System.Action<T> setter, T existingValue) { throw null; }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
|
||||
public sealed partial class CascadingParameterAttribute : System.Attribute
|
||||
{
|
||||
public CascadingParameterAttribute() { }
|
||||
|
|
@ -333,8 +333,8 @@ namespace Microsoft.AspNetCore.Components
|
|||
{
|
||||
System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg);
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false)]
|
||||
public partial class InjectAttribute : System.Attribute
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
|
||||
public sealed partial class InjectAttribute : System.Attribute
|
||||
{
|
||||
public InjectAttribute() { }
|
||||
}
|
||||
|
|
@ -371,7 +371,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
|
||||
public sealed partial class ParameterAttribute : System.Attribute
|
||||
{
|
||||
public ParameterAttribute() { }
|
||||
|
|
@ -415,7 +415,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
public void Render(Microsoft.AspNetCore.Components.RenderFragment renderFragment) { }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
|
||||
public partial class RouteAttribute : System.Attribute
|
||||
public sealed partial class RouteAttribute : System.Attribute
|
||||
{
|
||||
public RouteAttribute(string template) { }
|
||||
public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
|
|
@ -660,7 +660,7 @@ namespace Microsoft.AspNetCore.Components.Forms
|
|||
namespace Microsoft.AspNetCore.Components.Layouts
|
||||
{
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
|
||||
public partial class LayoutAttribute : System.Attribute
|
||||
public sealed partial class LayoutAttribute : System.Attribute
|
||||
{
|
||||
public LayoutAttribute(System.Type layoutType) { }
|
||||
public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
/// supplied by the closest ancestor <see cref="CascadingValue{T}"/> component that
|
||||
/// supplies values with a compatible type and name.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class CascadingParameterAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// 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;
|
||||
|
|
@ -9,8 +9,8 @@ namespace Microsoft.AspNetCore.Components
|
|||
/// Indicates that the associated property should have a value injected from the
|
||||
/// service provider during initialization.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||||
public class InjectAttribute : Attribute
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class InjectAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// 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 Microsoft.AspNetCore.Components;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.Layouts
|
||||
|
|
@ -10,14 +9,8 @@ namespace Microsoft.AspNetCore.Components.Layouts
|
|||
/// Indicates that the associated component type uses a specified layout.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
|
||||
public class LayoutAttribute : Attribute
|
||||
public sealed class LayoutAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of the layout. The type myst implement <see cref="IComponent"/>
|
||||
/// and must accept a parameter with the name 'Body'.
|
||||
/// </summary>
|
||||
public Type LayoutType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an instance of <see cref="LayoutAttribute"/>.
|
||||
/// </summary>
|
||||
|
|
@ -37,5 +30,11 @@ namespace Microsoft.AspNetCore.Components.Layouts
|
|||
// be a runtime error if the referenced component type rejects the 'Body' parameter
|
||||
// when it gets used.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type of the layout. The type must implement <see cref="IComponent"/>
|
||||
/// and must accept a parameter with the name 'Body'.
|
||||
/// </summary>
|
||||
public Type LayoutType { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
/// <summary>
|
||||
/// Denotes the target member as a component parameter.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class ParameterAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
/// Indicates that the associated component should match the specified route template pattern.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public class RouteAttribute : Attribute
|
||||
public sealed class RouteAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs an instance of <see cref="RouteAttribute"/>.
|
||||
|
|
|
|||
Loading…
Reference in New Issue