Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs
===================================================================
diff -u -r4031 -r4052
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs (.../ObjectCopier.cs) (revision 4031)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs (.../ObjectCopier.cs) (revision 4052)
@@ -49,120 +49,119 @@
using System.Collections.Generic;
using System.Reflection;
-namespace Deltares.DamEngine.Data.Standard
+namespace Deltares.DamEngine.Data.Standard;
+
+///
+/// Class to handle copying of objects
+///
+public static class ObjectCopier
{
+ private static readonly MethodInfo CloneMethod = typeof(Object).GetMethod("MemberwiseClone", BindingFlags.NonPublic | BindingFlags.Instance);
+
///
- /// Class to handle copying of objects
+ /// Determines whether this instance is primitive.
///
- public static class ObjectCopier
+ /// The type.
+ ///
+ /// true if the specified type is primitive; otherwise, false.
+ ///
+ public static bool IsPrimitive(this Type type)
{
- private static readonly MethodInfo CloneMethod = typeof(Object).GetMethod("MemberwiseClone", BindingFlags.NonPublic | BindingFlags.Instance);
+ if (type == typeof(String))
+ {
+ return true;
+ }
- ///
- /// Determines whether this instance is primitive.
- ///
- /// The type.
- ///
- /// true if the specified type is primitive; otherwise, false.
- ///
- public static bool IsPrimitive(this Type type)
+ return type.IsValueType && type.IsPrimitive;
+ }
+
+ ///
+ /// Copies the specified original object.
+ ///
+ /// The original object.
+ ///
+ public static Object Copy(Object originalObject)
+ {
+ return InternalCopy(originalObject, new Dictionary