ISite.Container is marked as non-nullable:
|
IContainer Container { get; } |
But the docs explicitly mention that the property can be null (https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.isite.container?view=netcore-3.1#remarks):
null for the Container property indicates that the IComponent instance does not have an ISite.
At least two .NET Framework implementations of ISite.Container return null, so this has been established for a while.
ISite.Container is marked as non-nullable:
runtime/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/ISite.cs
Line 29 in 627f133
But the docs explicitly mention that the property can be null (https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.isite.container?view=netcore-3.1#remarks):
At least two .NET Framework implementations of ISite.Container return null, so this has been established for a while.