Skip to content

Commit 3e2f884

Browse files
Ryan Nowakrynowak
authored andcommitted
Remove manual ref-assembly generation for Components
1 parent 732aca0 commit 3e2f884

19 files changed

+150
-149
lines changed

eng/GenAPI.exclusions.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22
T:Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame
33
# Manually implemented - https://github.com/dotnet/arcade/issues/2066
44
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel
5-
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel
6-
# Manually implemented - https://github.com/aspnet/AspNetCore/issues/8825
7-
T:Microsoft.AspNetCore.Components.AuthorizeView
8-
T:Microsoft.AspNetCore.Components.AuthorizeViewCore
9-
T:Microsoft.AspNetCore.Components.CascadingAuthenticationState
10-
T:Microsoft.AspNetCore.Components.CascadingValue`1
11-
T:Microsoft.AspNetCore.Components.PageDisplay
12-
T:Microsoft.AspNetCore.Components.Routing.Router
5+
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel

src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -45,76 +45,3 @@ public readonly partial struct RenderTreeFrame
4545
public override string ToString() { throw null; }
4646
}
4747
}
48-
49-
// Built-in components: https://github.com/aspnet/AspNetCore/issues/8825
50-
namespace Microsoft.AspNetCore.Components
51-
{
52-
public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore
53-
{
54-
public AuthorizeView() { }
55-
[Microsoft.AspNetCore.Components.ParameterAttribute]
56-
public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
57-
[Microsoft.AspNetCore.Components.ParameterAttribute]
58-
public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
59-
[Microsoft.AspNetCore.Components.ParameterAttribute]
60-
public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
61-
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
62-
}
63-
64-
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
65-
{
66-
public AuthorizeViewCore() { }
67-
[Microsoft.AspNetCore.Components.ParameterAttribute]
68-
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
69-
[Microsoft.AspNetCore.Components.ParameterAttribute]
70-
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
71-
[Microsoft.AspNetCore.Components.ParameterAttribute]
72-
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
73-
[Microsoft.AspNetCore.Components.ParameterAttribute]
74-
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
75-
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
76-
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
77-
[System.Diagnostics.DebuggerStepThroughAttribute]
78-
protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
79-
}
80-
81-
public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
82-
{
83-
public CascadingAuthenticationState() { }
84-
[Microsoft.AspNetCore.Components.ParameterAttribute]
85-
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
86-
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
87-
protected override void OnInitialized() { }
88-
void System.IDisposable.Dispose() { }
89-
}
90-
91-
public partial class CascadingValue<T> : Microsoft.AspNetCore.Components.IComponent
92-
{
93-
public CascadingValue() { }
94-
[Microsoft.AspNetCore.Components.ParameterAttribute]
95-
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
96-
[Microsoft.AspNetCore.Components.ParameterAttribute]
97-
public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
98-
[Microsoft.AspNetCore.Components.ParameterAttribute]
99-
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
100-
[Microsoft.AspNetCore.Components.ParameterAttribute]
101-
public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
102-
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
103-
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
104-
}
105-
106-
public partial class PageDisplay : Microsoft.AspNetCore.Components.IComponent
107-
{
108-
public PageDisplay() { }
109-
[Microsoft.AspNetCore.Components.ParameterAttribute]
110-
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
111-
[Microsoft.AspNetCore.Components.ParameterAttribute]
112-
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
113-
[Microsoft.AspNetCore.Components.ParameterAttribute]
114-
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
115-
[Microsoft.AspNetCore.Components.ParameterAttribute]
116-
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
117-
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
118-
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
119-
}
120-
}

src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,33 @@ public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler A
1616
public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> GetAuthenticationStateAsync();
1717
protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> task) { }
1818
}
19+
public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore
20+
{
21+
public AuthorizeView() { }
22+
[Microsoft.AspNetCore.Components.ParameterAttribute]
23+
public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
24+
[Microsoft.AspNetCore.Components.ParameterAttribute]
25+
public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
26+
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
27+
}
28+
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
29+
{
30+
protected AuthorizeViewCore() { }
31+
[Microsoft.AspNetCore.Components.ParameterAttribute]
32+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
33+
[Microsoft.AspNetCore.Components.ParameterAttribute]
34+
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
35+
[Microsoft.AspNetCore.Components.ParameterAttribute]
36+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
37+
[Microsoft.AspNetCore.Components.ParameterAttribute]
38+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
39+
[Microsoft.AspNetCore.Components.ParameterAttribute]
40+
public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
41+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
42+
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
43+
[System.Diagnostics.DebuggerStepThroughAttribute]
44+
protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
45+
}
1946
public static partial class BindConverter
2047
{
2148
public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -63,12 +90,35 @@ public static partial class BindConverter
6390
public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
6491
public static bool TryConvertTo<T>(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
6592
}
93+
public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
94+
{
95+
public CascadingAuthenticationState() { }
96+
[Microsoft.AspNetCore.Components.ParameterAttribute]
97+
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
98+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
99+
protected override void OnInitialized() { }
100+
void System.IDisposable.Dispose() { }
101+
}
66102
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
67103
public sealed partial class CascadingParameterAttribute : System.Attribute
68104
{
69105
public CascadingParameterAttribute() { }
70106
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
71107
}
108+
public partial class CascadingValue<T> : Microsoft.AspNetCore.Components.IComponent
109+
{
110+
public CascadingValue() { }
111+
[Microsoft.AspNetCore.Components.ParameterAttribute]
112+
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
113+
[Microsoft.AspNetCore.Components.ParameterAttribute]
114+
public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
115+
[Microsoft.AspNetCore.Components.ParameterAttribute]
116+
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
117+
[Microsoft.AspNetCore.Components.ParameterAttribute]
118+
public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
119+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
120+
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
121+
}
72122
public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent
73123
{
74124
public ComponentBase() { }
@@ -231,7 +281,7 @@ public abstract partial class LayoutComponentBase : Microsoft.AspNetCore.Compone
231281
{
232282
protected LayoutComponentBase() { }
233283
[Microsoft.AspNetCore.Components.ParameterAttribute]
234-
public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
284+
public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
235285
}
236286
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
237287
public readonly partial struct MarkupString
@@ -247,6 +297,20 @@ public partial class NavigationException : System.Exception
247297
public NavigationException(string uri) { }
248298
public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
249299
}
300+
public partial class PageDisplay : Microsoft.AspNetCore.Components.IComponent
301+
{
302+
public PageDisplay() { }
303+
[Microsoft.AspNetCore.Components.ParameterAttribute]
304+
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
305+
[Microsoft.AspNetCore.Components.ParameterAttribute]
306+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
307+
[Microsoft.AspNetCore.Components.ParameterAttribute]
308+
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
309+
[Microsoft.AspNetCore.Components.ParameterAttribute]
310+
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
311+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
312+
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
313+
}
250314
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
251315
public readonly partial struct Parameter
252316
{
@@ -587,4 +651,21 @@ public readonly partial struct LocationChangedEventArgs
587651
public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
588652
public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
589653
}
654+
public partial class Router : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable
655+
{
656+
public Router() { }
657+
[Microsoft.AspNetCore.Components.ParameterAttribute]
658+
public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
659+
[Microsoft.AspNetCore.Components.ParameterAttribute]
660+
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
661+
[Microsoft.AspNetCore.Components.ParameterAttribute]
662+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
663+
[Microsoft.AspNetCore.Components.ParameterAttribute]
664+
public Microsoft.AspNetCore.Components.RenderFragment NotFoundContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
665+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
666+
public void Dispose() { }
667+
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
668+
protected virtual void Render(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder, System.Type handler, System.Collections.Generic.IDictionary<string, object> parameters) { }
669+
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
670+
}
590671
}

src/Components/Components/src/Auth/AuthorizeView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ public AuthorizeView()
2323
/// <summary>
2424
/// The policy name that determines whether the content can be displayed.
2525
/// </summary>
26-
[Parameter] public string Policy { get; private set; }
26+
[Parameter] public string Policy { get; set; }
2727

2828
/// <summary>
2929
/// A comma delimited list of roles that are allowed to display the content.
3030
/// </summary>
31-
[Parameter] public string Roles { get; private set; }
31+
[Parameter] public string Roles { get; set; }
3232

3333
/// <summary>
3434
/// Gets the data used for authorization.

0 commit comments

Comments
 (0)