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
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
229
+
///
230
+
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
231
+
///
232
+
/// - array<DynamicObj>, list<DynamicObj>, ResizeArray<DynamicObj>: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
233
+
///
234
+
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
235
+
///
236
+
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
237
+
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
238
+
///
239
+
/// Note on Classes that inherit from DynamicObj:
240
+
///
241
+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
242
+
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
243
+
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
244
+
/// and then passing them to the class constructor if needed.
245
+
/// </summary>
246
+
/// <param name="o">The object that should be deep copied</param>
247
+
/// <param name="includeInstanceProperties">Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance for matched DynamicObj.</param>
/// <param name="overWrite">Whether existing properties on the target object will be overwritten. Default is false</param>
292
+
/// <param name="includeInstanceProperties">Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance. Default is true</param>
| Some pi when overWrite -> pi.SetValue target (CopyUtils.tryDeepCopyObj kv.Value)
@@ -327,19 +332,20 @@ type DynamicObj() =
327
332
/// Note on Classes that inherit from DynamicObj:
328
333
///
329
334
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
330
-
/// The deep coopied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
335
+
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
331
336
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
332
337
/// and then passing them to the class constructor if needed.
333
338
/// </summary>
334
-
/// <param name="target">The target object to copy dynamic members to</param>
335
-
/// <param name="overWrite">Whether existing properties on the target object will be overwritten</param>
336
-
memberthis.DeepCopyProperties()= CopyUtils.tryDeepCopyObj this
339
+
/// <param name="includeInstanceProperties">Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance. Default is true</param>
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
413
+
///
414
+
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
415
+
///
416
+
/// - array<DynamicObj>, list<DynamicObj>, ResizeArray<DynamicObj>: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
417
+
///
418
+
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
419
+
///
420
+
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
421
+
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
422
+
///
423
+
/// Note on Classes that inherit from DynamicObj:
424
+
///
425
+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
426
+
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
427
+
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
428
+
/// and then passing them to the class constructor if needed.
429
+
/// </summary>
430
+
/// <param name="o">The object that should be deep copied</param>
431
+
/// <param name="includeInstanceProperties">Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance for matched DynamicObj. Default is true</param>
0 commit comments