You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nullable build errors in Fluent server API + FileSystemClient + BaseVariableState
After merging master with the new Fluent server API (PR #3765), FileSystemClient
(PR #3760), and certificate group support (PR #3585), several new code paths
needed nullable annotations to align with the nullable4 branch:
- Stack/Opc.Ua.Types/State/BaseVariableState.cs: annotate four async value
hooks (OnReadValueAsync/OnSimpleReadValueAsync/OnWriteValueAsync/
OnSimpleWriteValueAsync) as nullable; widen the matching locals in
ReadAttributeAsync/WriteAttributeAsync; null-forgive the simple-handler
invocations gated by the prior null check; null-forgive the final
`return result` since result is flow-typed nullable after assignment.
- Libraries/Opc.Ua.Client/FileSystem/FileSystemClient.cs: null-forgive
QualifiedName.Name in CreateDirectory/CreateFile/MoveOrCopy leaf paths
where the segment is already validated upstream.
- Libraries/Opc.Ua.Server/Fluent/EventNotifierBuilderExtensions.cs: optional
EventPublishOptions parameter on both Publish overloads is now nullable.
- Libraries/Opc.Ua.Server/Fluent/EventPublishOptions.cs: OnError sink is
nullable (already documented as defaulting to null).
- Libraries/Opc.Ua.Server/Fluent/EventSourceRegistry.cs: Register options
parameter, SourceEntry.WorkerCts/WorkerTask fields and matching
DeactivateSource locals are nullable; null-coalesce
notifier.BrowseName.Name when projecting SourceName.
- Libraries/Opc.Ua.Server/Fluent/NodeBuilder.cs: ThrowIfSlotOccupied accepts
Delegate? so the four async OnRead/OnWrite call sites compile.
- Libraries/Opc.Ua.Server/Fluent/NodeManagerBuilder.cs: null-forgive the
`(QualifiedName)null` overload trampoline; EventSources backing property
starts null until AttachEventSources runs.
- Libraries/Opc.Ua.Server/Fluent/VariableBuilder.cs: FromVariant returns
TValue? (it already returned default on null); annotate the boxed local
and null-forgive the setter call sites.
No runtime behavior change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments