public void Save(ObservableQueue <ActivityMessage> queue) { var list = queue.ToList(); var serializator = new SerializatorIso <List <ActivityMessage> >(); serializator.Serialize(FileName, list); }
public ObservableQueue <ActivityMessage> Load() { var queue = new ObservableQueue <ActivityMessage>(); var serializator = new SerializatorIso <List <ActivityMessage> >(); var list = serializator.Deserialize(FileName); if (list != null) { queue = new ObservableQueue <ActivityMessage>(list); } return(queue); }
public Repository() { FileName = typeof(T).Name + "s.xml"; Serializator = new SerializatorIso <ObservableCollection <T> >(); }
public AppSettingsRepository() { serializator = new SerializatorIso <AppSettings>(); fileName = "appset.xml"; }