Skip to content

Commit 8ce68d0

Browse files
Ryan Nowakrynowak
authored andcommitted
Rename Configure -> Attach
Part of: #11610
1 parent f7ba8f1 commit 8ce68d0

31 files changed

+52
-52
lines changed

src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public class TestLayout : IComponent
149149
[Parameter]
150150
public RenderFragment Body { get; set; }
151151

152-
public void Configure(RenderHandle renderHandle)
152+
public void Attach(RenderHandle renderHandle)
153153
{
154154
}
155155

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public CascadingValue() { }
9999
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
100100
[Microsoft.AspNetCore.Components.ParameterAttribute]
101101
public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
102-
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
102+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
103103
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
104104
}
105105

@@ -114,7 +114,7 @@ public PageDisplay() { }
114114
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
115115
[Microsoft.AspNetCore.Components.ParameterAttribute]
116116
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
117-
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
117+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
118118
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
119119
}
120120
}
@@ -255,7 +255,7 @@ public NavLink() { }
255255
public RenderFragment ChildContent { get; set; }
256256
[Microsoft.AspNetCore.Components.ParameterAttribute]
257257
public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
258-
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
258+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
259259
public void Dispose() { }
260260
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
261261
}
@@ -271,7 +271,7 @@ public Router() { }
271271
public Microsoft.AspNetCore.Components.RenderFragment<AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
272272
[Microsoft.AspNetCore.Components.ParameterAttribute]
273273
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
274-
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
274+
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
275275
public void Dispose() { }
276276
protected virtual void Render(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder, System.Type handler, System.Collections.Generic.IDictionary<string, object> parameters) { }
277277
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public ComponentBase() { }
110110
protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
111111
protected System.Threading.Tasks.Task InvokeAsync(System.Action workItem) { throw null; }
112112
protected System.Threading.Tasks.Task InvokeAsync(System.Func<System.Threading.Tasks.Task> workItem) { throw null; }
113-
void Microsoft.AspNetCore.Components.IComponent.Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
113+
void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
114114
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
115115
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; }
116116
protected virtual void OnAfterRender() { }
@@ -359,7 +359,7 @@ public static partial class EventHandlers
359359
}
360360
public partial interface IComponent
361361
{
362-
void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
362+
void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
363363
System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters);
364364
}
365365
public partial interface IComponentContext

src/Components/Components/src/CascadingValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class CascadingValue<T> : ICascadingValueComponent, IComponent
5050
bool ICascadingValueComponent.CurrentValueIsFixed => IsFixed;
5151

5252
/// <inheritdoc />
53-
public void Configure(RenderHandle renderHandle)
53+
public void Attach(RenderHandle renderHandle)
5454
{
5555
_renderHandle = renderHandle;
5656
}

src/Components/Components/src/ComponentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected Task InvokeAsync(Action workItem)
158158
protected Task InvokeAsync(Func<Task> workItem)
159159
=> _renderHandle.Dispatcher.InvokeAsync(workItem);
160160

161-
void IComponent.Configure(RenderHandle renderHandle)
161+
void IComponent.Attach(RenderHandle renderHandle)
162162
{
163163
// This implicitly means a ComponentBase can only be associated with a single
164164
// renderer. That's the only use case we have right now. If there was ever a need,

src/Components/Components/src/IComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ namespace Microsoft.AspNetCore.Components
1111
public interface IComponent
1212
{
1313
/// <summary>
14-
/// Initializes the component.
14+
/// Attaches the component to a <see cref="RenderHandle" />.
1515
/// </summary>
1616
/// <param name="renderHandle">A <see cref="RenderHandle"/> that allows the component to be rendered.</param>
17-
void Configure(RenderHandle renderHandle);
17+
void Attach(RenderHandle renderHandle);
1818

1919
/// <summary>
2020
/// Sets parameters supplied by the component's parent in the render tree.

src/Components/Components/src/PageDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class PageDisplay : IComponent
4545
public RenderFragment AuthorizingContent { get; private set; }
4646

4747
/// <inheritdoc />
48-
public void Configure(RenderHandle renderHandle)
48+
public void Attach(RenderHandle renderHandle)
4949
{
5050
_renderHandle = renderHandle;
5151
}

src/Components/Components/src/Rendering/Renderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private ComponentState AttachAndInitComponent(IComponent component, int parentCo
185185
var componentState = new ComponentState(this, componentId, component, parentComponentState);
186186
Log.InitializingComponent(_logger, componentState, parentComponentState);
187187
_componentStateById.Add(componentId, componentState);
188-
component.Configure(new RenderHandle(this, componentId));
188+
component.Attach(new RenderHandle(this, componentId));
189189
return componentState;
190190
}
191191

src/Components/Components/src/Routing/Router.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class Router : IComponent, IHandleAfterRender, IDisposable
5656
private RouteTable Routes { get; set; }
5757

5858
/// <inheritdoc />
59-
public void Configure(RenderHandle renderHandle)
59+
public void Attach(RenderHandle renderHandle)
6060
{
6161
_logger = LoggerFactory.CreateLogger<Router>();
6262
_renderHandle = renderHandle;

src/Components/Components/test/CascadingParameterStateTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static CascadingValue<T> CreateCascadingValueComponent<T>(T value, string name =
374374
{
375375
var supplier = new CascadingValue<T>();
376376
var renderer = new TestRenderer();
377-
supplier.Configure(new RenderHandle(renderer, 0));
377+
supplier.Attach(new RenderHandle(renderer, 0));
378378

379379
var supplierParams = new Dictionary<string, object>
380380
{
@@ -424,7 +424,7 @@ class ComponentWithNamedCascadingParam : TestComponentBase
424424

425425
class TestComponentBase : IComponent
426426
{
427-
public void Configure(RenderHandle renderHandle)
427+
public void Attach(RenderHandle renderHandle)
428428
=> throw new NotImplementedException();
429429

430430
public Task SetParametersAsync(ParameterCollection parameters)

0 commit comments

Comments
 (0)