CR: Clarify comment
This commit is contained in:
parent
c2a45b4fd6
commit
9afb1ce6ae
|
|
@ -20,7 +20,8 @@ namespace Microsoft.AspNetCore.Components.Rendering
|
||||||
|
|
||||||
public void AssertNotExpired()
|
public void AssertNotExpired()
|
||||||
{
|
{
|
||||||
// _owner will be null if this instance is default(ParameterViewLifetime)
|
// If _owner is null, this instance is default(ParameterViewLifetime), which is
|
||||||
|
// the same as ParameterViewLifetime.Unbound. That means it never expires.
|
||||||
if (_owner != null && _owner.ParameterViewValidityStamp != _stamp)
|
if (_owner != null && _owner.ParameterViewValidityStamp != _stamp)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.");
|
throw new InvalidOperationException($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue