AllowDuplicates and Ordered attribute was missing while converting SMC
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V1_0.cs b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V1_0.cs
index 493aa2d..e2db15f 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V1_0.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V1_0.cs
@@ -73,7 +73,7 @@
{
Blob blob = new Blob(castedBlob.IdShort)
{
- MimeType = castedBlob.MimeType
+ MimeType = castedBlob.MimeType
};
blob.SetValue(castedBlob.Value);
@@ -101,7 +101,7 @@
}
else if (modelType == ModelType.Event && envSubmodelElement is Event_V1_0 castedEvent)
{
- Event eventable = new BasicEvent(castedEvent.IdShort);
+ Event eventable = new BasicEvent(castedEvent.IdShort);
submodelElement = eventable;
}
@@ -114,7 +114,7 @@
};
var operationInElements = castedOperation.In?.ConvertAll(c => c.Value?.submodelElement?.ToSubmodelElement(conceptDescriptions, parent));
- if(operationInElements?.Count > 0)
+ if (operationInElements?.Count > 0)
foreach (var element in operationInElements)
operation.InputVariables.Add(element);
@@ -127,7 +127,11 @@
}
else if (modelType == ModelType.SubmodelElementCollection && envSubmodelElement is SubmodelElementCollection_V1_0 castedSubmodelElementCollection)
{
- SubmodelElementCollection submodelElementCollection = new SubmodelElementCollection(castedSubmodelElementCollection.IdShort);
+ SubmodelElementCollection submodelElementCollection = new SubmodelElementCollection(castedSubmodelElementCollection.IdShort)
+ {
+ AllowDuplicates = castedSubmodelElementCollection.AllowDuplicates,
+ Ordered = castedSubmodelElementCollection.Ordered
+ };
if (castedSubmodelElementCollection.Value?.Count > 0)
{
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v2.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V2_0.cs b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v2.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V2_0.cs
index 3d9aa38..a66030b 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v2.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V2_0.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v2.0/EnvironmentSubmodelElements/EnvironmentSubmodelElementFactory_V2_0.cs
@@ -195,7 +195,11 @@
}
else if (modelType == ModelType.SubmodelElementCollection && envSubmodelElement is SubmodelElementCollection_V2_0 castedSubmodelElementCollection)
{
- SubmodelElementCollection submodelElementCollection = new SubmodelElementCollection(castedSubmodelElementCollection.IdShort);
+ SubmodelElementCollection submodelElementCollection = new SubmodelElementCollection(castedSubmodelElementCollection.IdShort)
+ {
+ AllowDuplicates = castedSubmodelElementCollection.AllowDuplicates,
+ Ordered = castedSubmodelElementCollection.Ordered
+ };
if (castedSubmodelElementCollection.Value?.Count > 0)
{