예제 #1
0
        public void Save(ObservableQueue <ActivityMessage> queue)
        {
            var list = queue.ToList();

            var serializator = new SerializatorIso <List <ActivityMessage> >();

            serializator.Serialize(FileName, list);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public Repository()
 {
     FileName     = typeof(T).Name + "s.xml";
     Serializator = new SerializatorIso <ObservableCollection <T> >();
 }
예제 #4
0
 public AppSettingsRepository()
 {
     serializator = new  SerializatorIso <AppSettings>();
     fileName     = "appset.xml";
 }