Oct 16, 2013 at 8:49 PM
Edited Oct 17, 2013 at 7:33 PM
Hello, i have a Service, which contain Project : ModelBase.
And this Project contains Dictionary<string /PAth
/, IFile /Reference to some file model base
I wan't to save all this Models (Project and IFiles) to separate locations.
I've created some custom ISavableModel which allows Save(as) and Load(From) and store last location so on Save it saving to last location, if last location is null it's pop-out Dialog where to save it or cancel Saving.
But to save all child Models i have to iterate over this dictionary. I want to use SerializerModifierBase for that.
Also i'm saving Workspace (view positions, etc.) to file and i want to use that data after it have been loaded from file. I've created
public class NotifyingXmlSerializer : XmlSerializer
public NotifyingXmlSerializer(ISerializationManager serializationManager,
: base(serializationManager, dataContractSerializerFactory)
protected override void BeforeSerialization([NotNull] ISerializationContext<XElement> context)
if (context.Model is ISerializationNotifyible)
(context.Model as ISerializationNotifyible).BeforeSerialization();
Is it OK?
The third problem is how to warry user what he is Saving before Save. Like when you are closing project in MSVC. My models not always have ViewModels so i can't use IViewModelManager to do it, is there any analog for Models?