on 01-24-2014 05:55 PM
Jeff Lindborg:ah... so you want to have your user (or transfer rule or call handler or
whatever) object i the SDK to be clonable so you can keep the original
copy and the one that has your changes (in the change list) around
seperately
If there'd be a method on the object (like Rollback.. Revert) that would apply the original value, that would make things easier. It could get tricky though with dependant objects - I'm currently looking at notification devices.maybe a better (easier/cleaner) approach would be for me to tie the change list to a corresponding "original value" list - both name/value pairs - when you change a property the change list and original value list both get updated with that property get updated. Making the objects clonable is also possible but the rollback process would be pretty manual - with an "original value" list to work with you can simply apply those values again. I'd have to think about the implementation a bit (i.e. you wouldn't want it to flush like you do the change list after a successful update) but this seems doable and possibly handy. Am I understanding the nature of your challange properly here?
1) But why internal and not protected? I understand that the the full user needs to inherit from UserBase - but internal exposes the changelist to the entire namespace.Jeff Lindborg:1. the way the full inherits from the base class means I needed to use internal instead of private for the change list structure for that – just added that functionality.
2. I disagree a bit on the change list logic – I just changed the ConnectionPropertyList class to behave such that if the property name already exists in the list to simply update the value for that property to the most recent change (last write wins) rather than rejecting the change – this makes more sense to me and follows conventions I’ve seen elsewhere for similar property handling.
3. Continuing to work on the clone – have several things I’m supposed to be working on but I should be able to get a version checked in early next week and update NuGet after that – you can get updated source before I update the NuGet binaries – I’ll ping you when the updated library is checked in.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: