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
Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance for matched DynamicObj. Default is true
<ahref="https://github.com/CSBiology/DynamicObj/tree/master/src/DynamicObj/DynamicObj.fs#L392-392" class="fsdocs-source-link" title="Source on GitHub">
204
+
<ahref="https://github.com/CSBiology/DynamicObj/tree/master/src/DynamicObj/DynamicObj.fs#L432-432" class="fsdocs-source-link" title="Source on GitHub">
- ResizeArrays and Dictionaries containing any combination of basic F# types
215
+
216
+
- Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
217
+
218
+
- array<DynamicObj>, list<DynamicObj>, ResizeArray<DynamicObj>: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
219
+
220
+
- System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
221
+
222
+
- DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
223
+
if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
224
+
225
+
Note on Classes that inherit from DynamicObj:
226
+
227
+
Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
228
+
The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
229
+
It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
230
+
and then passing them to the class constructor if needed.
231
+
197
232
</p>
198
233
</div>
199
234
</summary>
@@ -205,7 +240,23 @@ <h3>
205
240
:
206
241
<code>obj</code>
207
242
</dt>
208
-
<ddclass="fsdocs-param-docs"></dd>
243
+
<ddclass="fsdocs-param-docs">
244
+
<p>
245
+
The object that should be deep copied
246
+
</p>
247
+
</dd>
248
+
<dtclass="fsdocs-param">
249
+
<spanclass="fsdocs-param-name">
250
+
?includeInstanceProperties
251
+
</span>
252
+
:
253
+
<code>bool</code>
254
+
</dt>
255
+
<ddclass="fsdocs-param-docs">
256
+
<p>
257
+
Whether to include instance properties (= 'static' properties on the class) as dynamic properties on the new instance for matched DynamicObj. Default is true
0 commit comments