CR: Clarify comment

This commit is contained in:
Steve Sanderson 2019-09-29 21:48:46 +01:00 committed by Artak
parent c2a45b4fd6
commit 9afb1ce6ae
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ namespace Microsoft.AspNetCore.Components.Rendering
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)
{
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.");