Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions Applications/ConsoleReferenceClient/ClientSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
using Microsoft.Extensions.Logging;
using Opc.Ua;
using Opc.Ua.Client;
using Opc.Ua.ComplexTypes;
using Opc.Ua.Client.ComplexTypes;

namespace Quickstarts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<ProjectReference Include="..\..\Libraries\Opc.Ua.Configuration\Opc.Ua.Configuration.csproj" />
<ProjectReference Include="..\..\Libraries\Opc.Ua.Client\Opc.Ua.Client.csproj" />
<ProjectReference Include="..\..\Libraries\Opc.Ua.Client.ComplexTypes\Opc.Ua.Client.ComplexTypes.csproj" />
<ProjectReference Include="..\..\Libraries\Opc.Ua.ComplexTypes\Opc.Ua.ComplexTypes.csproj" />
</ItemGroup>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should pull this in via Opc.Ua.Client.csproj, not seperate.

<ItemGroup>
<None Update="Quickstarts.ReferenceClient.Config.xml">
Expand Down
1 change: 1 addition & 0 deletions Applications/ConsoleReferenceClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
using Microsoft.Extensions.Logging;
using Opc.Ua;
using Opc.Ua.Client;
using Opc.Ua.ComplexTypes;
using Opc.Ua.Client.ComplexTypes;
using Opc.Ua.Configuration;
using Opc.Ua.Security.Certificates;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
using System.Threading.Tasks;
using System.Xml;
using Microsoft.Extensions.Logging;
using Opc.Ua.ComplexTypes;

namespace Opc.Ua.Client.ComplexTypes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* ======================================================================*/

using System;
using Opc.Ua.ComplexTypes;

namespace Opc.Ua.Client.ComplexTypes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* http://opcfoundation.org/License/MIT/1.00/
* ======================================================================*/

using Opc.Ua.ComplexTypes;

namespace Opc.Ua.Client.ComplexTypes
{
/// <summary>
Expand Down
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move those 3 files you moved here back to Opc.Ua.Client. The reason there is Opc.Ua.Client.ComplexTypes is strictly for back compat with 1.5 and to segregate the legacy reflection based type builders. These old reflection emit type builders should not pollute the 1.6 native AOT paths. This also extends to the pieces you moved to Opc.Ua.ComplexTypes, move the reflection.emit bits back to this project too (Opc.Ua.Client.ComplexTypes).

OR - if you absolutely need the reflection emit path on the server side, create a Opc.Ua.ComplexTypes.Reflection package that essentially replaces Opc.Ua.Client.ComplexTypes (today). We can then add a metadata nuget in nuget.spec to wrap it so it keeps its name.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Opc.Ua.ComplexTypes;

namespace Opc.Ua.Client.ComplexTypes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="Opc.Ua.Client.ComplexTypes.Tests" />
<InternalsVisibleTo Include="Opc.Ua.Client.Tests" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PackageId>$(PackageId).Debug</PackageId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Stack\Opc.Ua.Core\Opc.Ua.Core.csproj" />
<ProjectReference Include="..\Opc.Ua.Client\Opc.Ua.Client.csproj" />
<ProjectReference Include="..\Opc.Ua.ComplexTypes\Opc.Ua.ComplexTypes.csproj" />
</ItemGroup>
<Target Name="GetPackagingOutputs" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using System.Reflection;
using System.Reflection.Emit;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Use a single assembly and module builder instance to build the type system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using System.Reflection.Emit;
using System.Runtime.Serialization;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Extensions to build attributes for the complex type builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using System.Reflection;
using System.Reflection.Emit;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Build an assembly with custom enum types and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using System.Linq;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Factory function for the default complex type builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using System.Reflection.Emit;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Builder for property fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Default complex type builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Collections.Generic;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Default complex type factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Collections.Generic;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Complex type field builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System.Collections.Generic;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Factory class for the complex type builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Interface for the complex type builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Exception is thrown if the data type is not found.
Expand Down
27 changes: 27 additions & 0 deletions Libraries/Opc.Ua.ComplexTypes/Opc.Ua.ComplexTypes.csproj
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you moved the reflection emit code back out, link this package from Opc.Ua.Server and Opc.Ua.Client, so comes "for free" when bringing either one in.

Also - I would suggest a new Opc.Ua.ComplexTypes.Tests project that covers the code in this new project in particular (but not by pulling in Opc.Ua.Client, or server, just the remaining code.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>$(AssemblyPrefix).ComplexTypes</AssemblyName>
<TargetFrameworks>$(LibxTargetFrameworks)</TargetFrameworks>
<PackageId>$(PackagePrefix).Opc.Ua.ComplexTypes</PackageId>
<RootNamespace>Opc.Ua.ComplexTypes</RootNamespace>
<Description>OPC UA Complex Types Common Class Library</Description>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">true</IsAotCompatible>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="Opc.Ua.Client" />
<InternalsVisibleTo Include="Opc.Ua.Client.ComplexTypes" />
<InternalsVisibleTo Include="Opc.Ua.Server.ComplexTypes" />
<InternalsVisibleTo Include="Opc.Ua.Client.ComplexTypes.Tests" />
<InternalsVisibleTo Include="Opc.Ua.Client.Tests" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PackageId>$(PackageId).Debug</PackageId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Stack\Opc.Ua.Core\Opc.Ua.Core.csproj" />
</ItemGroup>
<Target Name="GetPackagingOutputs" />
</Project>
32 changes: 32 additions & 0 deletions Libraries/Opc.Ua.ComplexTypes/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* ========================================================================
* Copyright (c) 2005-2025 The OPC Foundation, Inc. All rights reserved.
*
* OPC Foundation MIT License 1.00
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* The complete license agreement can be found here:
* http://opcfoundation.org/License/MIT/1.00/
* ======================================================================*/

using System;

[assembly: CLSCompliant(false)]
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
using Microsoft.Extensions.Logging;
using Opc.Ua.Schema;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// A class that holds the configuration for a UA service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Linq;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Extensions to convert binary schema type definitions to DataTypeDefinitions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
using System.Text;
using System.Xml;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// The base class for all complex types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using System.Reflection;
using System.Runtime.Serialization;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Complex type property info.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System;
using System.Collections.Generic;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Interface to access properties of a complex type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Collections.Generic;
using System.Text;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// A complex type with optional fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// The known base complex types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Attribute for a base complex type field definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Attribute for type ids of a structure definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Collections.Generic;
using System.Text;

namespace Opc.Ua.Client.ComplexTypes
namespace Opc.Ua.ComplexTypes
{
/// <summary>
/// Implements a union complex type.
Expand Down
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see the need for Opc.Ua.Server.ComplexTypes, can you move the code under the Opc.Ua.Server project, and into a ComplexTypes folder?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>$(AssemblyPrefix).Server.ComplexTypes</AssemblyName>
<TargetFrameworks>$(LibxTargetFrameworks)</TargetFrameworks>
<PackageId>$(PackagePrefix).Opc.Ua.Server.ComplexTypes</PackageId>
<RootNamespace>Opc.Ua.Server.ComplexTypes</RootNamespace>
<Description>OPC UA Complex Types Server Class Library</Description>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">true</IsAotCompatible>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="Opc.Ua.Server.ComplexTypes.Tests" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PackageId>$(PackageId).Debug</PackageId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Stack\Opc.Ua.Core\Opc.Ua.Core.csproj" />
<ProjectReference Include="..\Opc.Ua.Server\Opc.Ua.Server.csproj" />
<ProjectReference Include="..\Opc.Ua.ComplexTypes\Opc.Ua.ComplexTypes.csproj" />
</ItemGroup>
<Target Name="GetPackagingOutputs" />
</Project>
Loading
Loading