CR: Add some "in" plus clean up "using"
This commit is contained in:
parent
1ac8ff104e
commit
762cbde480
|
|
@ -168,7 +168,7 @@ namespace Microsoft.AspNetCore.Components
|
||||||
_subscribers.Remove(subscriber);
|
_subscribers.Remove(subscriber);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NotifySubscribers(ParameterViewLifetime lifetime)
|
private void NotifySubscribers(in ParameterViewLifetime lifetime)
|
||||||
{
|
{
|
||||||
foreach (var subscriber in _subscribers)
|
foreach (var subscriber in _subscribers)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,12 @@ namespace Microsoft.AspNetCore.Components
|
||||||
private readonly int _ownerIndex;
|
private readonly int _ownerIndex;
|
||||||
private readonly IReadOnlyList<CascadingParameterState> _cascadingParametersOrNull;
|
private readonly IReadOnlyList<CascadingParameterState> _cascadingParametersOrNull;
|
||||||
|
|
||||||
internal ParameterView(ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex)
|
internal ParameterView(in ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex)
|
||||||
: this(lifetime, frames, ownerIndex, null)
|
: this(lifetime, frames, ownerIndex, null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private ParameterView(ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex, IReadOnlyList<CascadingParameterState> cascadingParametersOrNull)
|
private ParameterView(in ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex, IReadOnlyList<CascadingParameterState> cascadingParametersOrNull)
|
||||||
{
|
{
|
||||||
_lifetime = lifetime;
|
_lifetime = lifetime;
|
||||||
_frames = frames;
|
_frames = frames;
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
|
||||||
_renderer.AddToPendingTasks(Component.SetParametersAsync(parameters));
|
_renderer.AddToPendingTasks(Component.SetParametersAsync(parameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NotifyCascadingValueChanged(ParameterViewLifetime lifetime)
|
public void NotifyCascadingValueChanged(in ParameterViewLifetime lifetime)
|
||||||
{
|
{
|
||||||
var directParams = _latestDirectParametersSnapshot != null
|
var directParams = _latestDirectParametersSnapshot != null
|
||||||
? new ParameterView(lifetime, _latestDirectParametersSnapshot.Buffer, 0)
|
? new ParameterView(lifetime, _latestDirectParametersSnapshot.Buffer, 0)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
|
||||||
using Microsoft.AspNetCore.Components.RenderTree;
|
using Microsoft.AspNetCore.Components.RenderTree;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Components.Rendering
|
namespace Microsoft.AspNetCore.Components.Rendering
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue