Skip to content

Commit e222b11

Browse files
Ryan Nowakrynowak
Ryan Nowak
authored andcommitted
Rename Configure -> Attach
Part of: #11610
1 parent 45d3e69 commit e222b11

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
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() { }
@@ -361,7 +361,7 @@ public static partial class EventHandlers
361361
}
362362
public partial interface IComponent
363363
{
364-
void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
364+
void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
365365
System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters);
366366
}
367367
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)

src/Components/Components/test/ComponentFactoryTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private static IServiceProvider GetServiceProvider()
9898

9999
private class EmptyComponent : IComponent
100100
{
101-
public void Configure(RenderHandle renderHandle)
101+
public void Attach(RenderHandle renderHandle)
102102
{
103103
throw new NotImplementedException();
104104
}
@@ -125,7 +125,7 @@ private class ComponentWithInjectProperties : IComponent
125125

126126
public TestService2 GetProperty2() => Property2;
127127

128-
public void Configure(RenderHandle renderHandle)
128+
public void Attach(RenderHandle renderHandle)
129129
{
130130
throw new NotImplementedException();
131131
}
@@ -143,7 +143,7 @@ private class ComponentWithNonInjectableProperties : IComponent
143143

144144
public TestService1 Property2 { get; set; }
145145

146-
public void Configure(RenderHandle renderHandle)
146+
public void Attach(RenderHandle renderHandle)
147147
{
148148
throw new NotImplementedException();
149149
}

src/Components/Components/test/DependencyInjectionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class TestComponent : IComponent
194194
// not throw, then be sure also to add a test to verify that injection
195195
// occurs before lifecycle methods.
196196

197-
public void Configure(RenderHandle renderHandle)
197+
public void Attach(RenderHandle renderHandle)
198198
=> throw new NotImplementedException();
199199

200200
public Task SetParametersAsync(ParameterCollection parameters)

src/Components/Components/test/EventCallbackFactoryBinderExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public Task HandleEventAsync(EventCallbackWorkItem item, object arg)
662662
return item.InvokeAsync(arg);
663663
}
664664

665-
public void Configure(RenderHandle renderHandle)
665+
public void Attach(RenderHandle renderHandle)
666666
{
667667
throw new System.NotImplementedException();
668668
}

src/Components/Components/test/EventCallbackFactoryTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ public Task SomeFuncTTask(string s)
635635
return Task.CompletedTask;
636636
}
637637

638-
public void Configure(RenderHandle renderHandle)
638+
public void Attach(RenderHandle renderHandle)
639639
{
640640
throw new NotImplementedException();
641641
}

src/Components/Components/test/EventCallbackTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public Task HandleEventAsync(EventCallbackWorkItem item, object arg)
449449
return item.InvokeAsync(arg);
450450
}
451451

452-
public void Configure(RenderHandle renderHandle) => throw new NotImplementedException();
452+
public void Attach(RenderHandle renderHandle) => throw new NotImplementedException();
453453

454454
public Task SetParametersAsync(ParameterCollection parameters) => throw new NotImplementedException();
455455
}

src/Components/Components/test/ParameterCollectionAssignmentExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public ParameterCollection Build()
454454

455455
class FakeComponent : IComponent
456456
{
457-
public void Configure(RenderHandle renderHandle)
457+
public void Attach(RenderHandle renderHandle)
458458
=> throw new NotImplementedException();
459459

460460
public Task SetParametersAsync(ParameterCollection parameters)

src/Components/Components/test/ParameterCollectionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public IEnumerable<Parameter> ToEnumerable(ParameterCollection parameterCollecti
342342

343343
private class FakeComponent : IComponent
344344
{
345-
public void Configure(RenderHandle renderHandle)
345+
public void Attach(RenderHandle renderHandle)
346346
=> throw new NotImplementedException();
347347

348348
public Task SetParametersAsync(ParameterCollection parameters)

src/Components/Components/test/RenderTreeBuilderTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ public void ProcessDuplicateAttributes_CanRemoveOverwrittenAttributes()
18101810

18111811
private class TestComponent : IComponent
18121812
{
1813-
public void Configure(RenderHandle renderHandle) { }
1813+
public void Attach(RenderHandle renderHandle) { }
18141814

18151815
public Task SetParametersAsync(ParameterCollection parameters)
18161816
=> throw new NotImplementedException();

src/Components/Components/test/RenderTreeDiffBuilderTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,7 +2221,7 @@ private class FakeComponent : IComponent
22212221

22222222
public string NonParameterProperty { get; set; }
22232223

2224-
public void Configure(RenderHandle renderHandle) { }
2224+
public void Attach(RenderHandle renderHandle) { }
22252225
public Task SetParametersAsync(ParameterCollection parameters)
22262226
{
22272227
parameters.SetParameterProperties(this);
@@ -2231,7 +2231,7 @@ public Task SetParametersAsync(ParameterCollection parameters)
22312231

22322232
private class FakeComponent2 : IComponent
22332233
{
2234-
public void Configure(RenderHandle renderHandle)
2234+
public void Attach(RenderHandle renderHandle)
22352235
{
22362236
}
22372237

@@ -2242,7 +2242,7 @@ private class CaptureSetParametersComponent : IComponent
22422242
{
22432243
public int SetParametersCallCount { get; private set; }
22442244

2245-
public void Configure(RenderHandle renderHandle)
2245+
public void Attach(RenderHandle renderHandle)
22462246
{
22472247
}
22482248

@@ -2258,14 +2258,14 @@ private class DisposableComponent : IComponent, IDisposable
22582258
public int DisposalCount { get; private set; }
22592259
public void Dispose() => DisposalCount++;
22602260

2261-
public void Configure(RenderHandle renderHandle) { }
2261+
public void Attach(RenderHandle renderHandle) { }
22622262

22632263
public Task SetParametersAsync(ParameterCollection parameters) => Task.CompletedTask;
22642264
}
22652265

22662266
private class NonDisposableComponent : IComponent
22672267
{
2268-
public void Configure(RenderHandle renderHandle) { }
2268+
public void Attach(RenderHandle renderHandle) { }
22692269

22702270
public Task SetParametersAsync(ParameterCollection parameters) => Task.CompletedTask;
22712271
}

src/Components/Components/test/RendererTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3399,7 +3399,7 @@ public TestComponent(RenderFragment renderFragment)
33993399
_renderFragment = renderFragment;
34003400
}
34013401

3402-
public void Configure(RenderHandle renderHandle)
3402+
public void Attach(RenderHandle renderHandle)
34033403
{
34043404
_renderHandle = renderHandle;
34053405
}
@@ -3470,7 +3470,7 @@ private class FakeComponent : IComponent
34703470

34713471
public RenderHandle RenderHandle { get; private set; }
34723472

3473-
public void Configure(RenderHandle renderHandle)
3473+
public void Attach(RenderHandle renderHandle)
34743474
=> RenderHandle = renderHandle;
34753475

34763476
public Task SetParametersAsync(ParameterCollection parameters)
@@ -3619,7 +3619,7 @@ private class RendersSelfAfterEventComponent : IComponent, IHandleEvent
36193619

36203620
private RenderHandle _renderHandle;
36213621

3622-
public void Configure(RenderHandle renderHandle)
3622+
public void Attach(RenderHandle renderHandle)
36233623
=> _renderHandle = renderHandle;
36243624

36253625
public Task SetParametersAsync(ParameterCollection parameters)
@@ -3650,7 +3650,7 @@ private class MultiRendererComponent : IComponent
36503650
private readonly List<RenderHandle> _renderHandles
36513651
= new List<RenderHandle>();
36523652

3653-
public void Configure(RenderHandle renderHandle)
3653+
public void Attach(RenderHandle renderHandle)
36543654
=> _renderHandles.Add(renderHandle);
36553655

36563656
public Task SetParametersAsync(ParameterCollection parameters)
@@ -3764,7 +3764,7 @@ public AsyncComponent(Task taskToAwait, int number)
37643764

37653765
public int Number { get; set; }
37663766

3767-
public void Configure(RenderHandle renderHandle)
3767+
public void Attach(RenderHandle renderHandle)
37683768
{
37693769
_renderHandler = renderHandle;
37703770
}
@@ -3806,7 +3806,7 @@ public void SomeMethod()
38063806
SomeMethodCallCount++;
38073807
}
38083808

3809-
public void Configure(RenderHandle renderHandle)
3809+
public void Attach(RenderHandle renderHandle)
38103810
{
38113811
_renderHandle = renderHandle;
38123812
}

src/Components/Components/test/Rendering/HtmlRendererTestBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ private class ComponentWithParameters : IComponent
439439
{
440440
public RenderHandle RenderHandle { get; private set; }
441441

442-
public void Configure(RenderHandle renderHandle)
442+
public void Attach(RenderHandle renderHandle)
443443
{
444444
RenderHandle = renderHandle;
445445
}
@@ -553,7 +553,7 @@ private class ChildComponent : IComponent
553553
{
554554
private RenderHandle _renderHandle;
555555

556-
public void Configure(RenderHandle renderHandle)
556+
public void Attach(RenderHandle renderHandle)
557557
{
558558
_renderHandle = renderHandle;
559559
}
@@ -584,7 +584,7 @@ private class TestComponent : IComponent
584584
[Inject]
585585
public RenderFragment Fragment { get; set; }
586586

587-
public void Configure(RenderHandle renderHandle)
587+
public void Attach(RenderHandle renderHandle)
588588
{
589589
_renderHandle = renderHandle;
590590
}

src/Components/Server/test/Circuits/CircuitHostTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public void Dispose()
273273
private class ThrowOnDisposeComponent : IComponent, IDisposable
274274
{
275275
public bool DidCallDispose { get; private set; }
276-
public void Configure(RenderHandle renderHandle) { }
276+
public void Attach(RenderHandle renderHandle) { }
277277

278278
public Task SetParametersAsync(ParameterCollection parameters)
279279
=> Task.CompletedTask;

src/Components/Server/test/Circuits/CircuitPrerendererTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class UriDisplayComponent : IComponent
221221

222222
[Inject] IUriHelper UriHelper { get; set; }
223223

224-
public void Configure(RenderHandle renderHandle)
224+
public void Attach(RenderHandle renderHandle)
225225
{
226226
_renderHandle = renderHandle;
227227
}
@@ -242,7 +242,7 @@ public Task SetParametersAsync(ParameterCollection parameters)
242242

243243
class ThrowExceptionComponent : IComponent
244244
{
245-
public void Configure(RenderHandle renderHandle)
245+
public void Attach(RenderHandle renderHandle)
246246
=> throw new InvalidTimeZoneException();
247247

248248
public Task SetParametersAsync(ParameterCollection parameters)

src/Components/Server/test/Circuits/RemoteRendererTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public TestComponent(RenderFragment renderFragment)
293293

294294
public Action OnAfterRenderComplete { get; set; }
295295

296-
public void Configure(RenderHandle renderHandle)
296+
public void Attach(RenderHandle renderHandle)
297297
{
298298
_renderHandle = renderHandle;
299299
}
@@ -325,7 +325,7 @@ private class AutoParameterTestComponent : IComponent
325325

326326
[Parameter] public Trigger Trigger { get; set; }
327327

328-
public void Configure(RenderHandle renderHandle)
328+
public void Attach(RenderHandle renderHandle)
329329
{
330330
_renderHandle = renderHandle;
331331
}

0 commit comments

Comments
 (0)