-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to ignore Events or Properties #10
Comments
Currently, there is no such ability. I've received another similar issues and will try to implement related feature. |
Has this been implemented yet? This is a great library but this causes problems if a object implements INotifyPropertyChanged. Maybe you can hard code it to not clone that property for the time being. |
Not implemented yet. Sorry, I have no time to do this in nearest time. It not simple because code tries to clone object itself in one step (if possible), for this case I need some more analyzing to find best way to copy and test it. Also, before implementing I should check, whereas real problem exists. |
Same issue here... When using INotifyPropertyChanged it becomes a problem that it copies the events. I was using MemberwiseClone before and had the same issue... Hoping for this to be configurable anytime soon. Thanks! |
Any hacks? How to override behavior? |
I have ideas, but do not have enough time to fix it. You can try to do something like
It's dirty hack, and it will not work in future versions, but I'll try to do something with this feature in future versions :) |
Any progress? |
A feasible method may be to add a generic overload to DeepClone DeepClone(params Expression<T,TFieldName>[] ignoreExps) |
Adding the event in the the ignore code above doesn't seem to be working.
The event trigger on the cloned objects and it prints both changed line. |
Hello, I have quite a few classes that implement INotifyPropertyChanged due to mvvm, cloning these classes seems to lead to a memory error and crash problem.
Is there a way to not clone events or specific properties?
The text was updated successfully, but these errors were encountered: