diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index 5eefe24556..2a469da63f 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Components public static System.Action SetValueHandler(System.Action setter, string existingValue) { throw null; } public static System.Action SetValueHandler(System.Action 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; } } diff --git a/src/Components/Components/src/CascadingParameterAttribute.cs b/src/Components/Components/src/CascadingParameterAttribute.cs index f4855da312..ca8113976b 100644 --- a/src/Components/Components/src/CascadingParameterAttribute.cs +++ b/src/Components/Components/src/CascadingParameterAttribute.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components /// supplied by the closest ancestor component that /// supplies values with a compatible type and name. /// - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class CascadingParameterAttribute : Attribute { /// diff --git a/src/Components/Components/src/InjectAttribute.cs b/src/Components/Components/src/InjectAttribute.cs index 3490c456ce..f18381fe9c 100644 --- a/src/Components/Components/src/InjectAttribute.cs +++ b/src/Components/Components/src/InjectAttribute.cs @@ -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. /// - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] - public class InjectAttribute : Attribute + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] + public sealed class InjectAttribute : Attribute { } } diff --git a/src/Components/Components/src/Layouts/LayoutAttribute.cs b/src/Components/Components/src/Layouts/LayoutAttribute.cs index 011d1b9924..ff722849cd 100644 --- a/src/Components/Components/src/Layouts/LayoutAttribute.cs +++ b/src/Components/Components/src/Layouts/LayoutAttribute.cs @@ -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. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] - public class LayoutAttribute : Attribute + public sealed class LayoutAttribute : Attribute { - /// - /// The type of the layout. The type myst implement - /// and must accept a parameter with the name 'Body'. - /// - public Type LayoutType { get; private set; } - /// /// Constructs an instance of . /// @@ -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. } + + /// + /// The type of the layout. The type must implement + /// and must accept a parameter with the name 'Body'. + /// + public Type LayoutType { get; private set; } } } diff --git a/src/Components/Components/src/ParameterAttribute.cs b/src/Components/Components/src/ParameterAttribute.cs index afad81d525..25a0bed565 100644 --- a/src/Components/Components/src/ParameterAttribute.cs +++ b/src/Components/Components/src/ParameterAttribute.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components /// /// Denotes the target member as a component parameter. /// - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class ParameterAttribute : Attribute { /// diff --git a/src/Components/Components/src/RouteAttribute.cs b/src/Components/Components/src/RouteAttribute.cs index a503dab195..6e3214845b 100644 --- a/src/Components/Components/src/RouteAttribute.cs +++ b/src/Components/Components/src/RouteAttribute.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components /// Indicates that the associated component should match the specified route template pattern. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] - public class RouteAttribute : Attribute + public sealed class RouteAttribute : Attribute { /// /// Constructs an instance of .