Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sample node managers for removal of leaking reference #585

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Samples/Client/ClientPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public async Task<bool> Connect(ConfiguredEndpoint endpoint)
/// <summary>
/// Updates the status control when a keep alive event occurs.
/// </summary>
async void StandardClient_KeepAlive(Session sender, KeepAliveEventArgs e)
async void StandardClient_KeepAlive(ISession sender, KeepAliveEventArgs e)
{
if (!Dispatcher.HasThreadAccess)
{
Expand Down
2 changes: 1 addition & 1 deletion Samples/Opc.Ua.Sample/Base/CustomNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
/// <summary>
/// The root notifiers for the node manager.
/// </summary>
protected List<NodeState> RootNotifiers

Check warning on line 160 in Samples/Opc.Ua.Sample/Base/CustomNodeManager.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Change 'List<NodeState>' in 'CustomNodeManager2.RootNotifiers' to use 'Collection<T>', 'ReadOnlyCollection<T>' or 'KeyedCollection<K,V>' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002)
{
get { return m_rootNotifiers; }
}
Expand Down Expand Up @@ -507,7 +507,7 @@
LocalReference referenceToRemove = new LocalReference(
(NodeId)reference.TargetId,
reference.ReferenceTypeId,
reference.IsInverse,
!reference.IsInverse,
node.NodeId);

referencesToRemove.Add(referenceToRemove);
Expand Down
2 changes: 1 addition & 1 deletion Samples/Opc.Ua.Sample/Base/SampleNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
/// <summary>
/// The root notifiers for the node manager.
/// </summary>
protected List<NodeState> RootNotifiers

Check warning on line 149 in Samples/Opc.Ua.Sample/Base/SampleNodeManager.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Change 'List<NodeState>' in 'SampleNodeManager.RootNotifiers' to use 'Collection<T>', 'ReadOnlyCollection<T>' or 'KeyedCollection<K,V>' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002)
{
get { return m_rootNotifiers; }
}
Expand Down Expand Up @@ -506,7 +506,7 @@
LocalReference referenceToRemove = new LocalReference(
(NodeId)reference.TargetId,
reference.ReferenceTypeId,
reference.IsInverse,
!reference.IsInverse,
node.NodeId);

referencesToRemove.Add(referenceToRemove);
Expand Down
2 changes: 1 addition & 1 deletion Workshop/Common/QuickstartNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ protected virtual void RemovePredefinedNode(
LocalReference referenceToRemove = new LocalReference(
(NodeId)reference.TargetId,
reference.ReferenceTypeId,
reference.IsInverse,
!reference.IsInverse,
node.NodeId);

referencesToRemove.Add(referenceToRemove);
Expand Down
Loading