Code Red > .NET

DisposableWrapper Class

(1/1)

nekitip:
What does
--- Code: ---DisposableWrapper Class
--- End code ---
mean to us?
Can I safely copy a class inheriting from it, and apply to another object?

Here is the documentation:
https://help.autodesk.com/view/OARX/2019/ENU/?guid=OREFNET-Autodesk_AutoCAD_Runtime_DisposableWrapper

What I care about it is my "BURST" .NET atempt where I have Color class, and I'm thinking of copy color of object before doing setpropertiesfrom, and later returning to the same object. (check separate topic)
The documentation for color class:
https://help.autodesk.com/view/OARX/2019/ENU/?guid=OREFNET-Autodesk_AutoCAD_Colors_Color

MickD:
The disposable wrapper is a class that wraps the native C++ ARX classes. Unless you are writing a custom object and need to wrap it for .Net consumption I wouldn't worry about it.
So short answer is yes but sometimes you may need to 'clone' to make a copy.

I'd just try it, it will definitely let you know if it fails :)

nekitip:
I did try, nothing happend for 5 minutes, I had no more patience :roll:. What is the normal time such things to fail?

Anyway, just to fill in, in this particular case, I've managed to find how to instead use EntityColor, which is, if I understand correctly, struct type, so there should be no problem with wrapped pointers. But my fears of wrappers still remain  :2funny:

Navigation

[0] Message Index

Go to full version