Exemplo n.º 1
0
 public static void Create(string repositoryName, string repositoryFullPath, string userName)
 {
     instance = new InMemoryStore();
     instance.RepositoryName = repositoryName;
     instance.RepositoryFullPath = repositoryFullPath;
     instance.UserName = userName;
     instance.InfoChangeFiles = new List<InfoChangeFile>();
 }
Exemplo n.º 2
0
        private static void Load(string repositoryFullPath = null)
        {
            if (repositoryFullPath == null)
                repositoryFullPath = instance.RepositoryFullPath;

            XmlSerializer xmlFormat = new XmlSerializer(typeof(InMemoryStore));
            using (Stream fstream = new FileStream(repositoryFullPath + "\\" + FileName, FileMode.Open))
            {
                instance = (InMemoryStore)xmlFormat.Deserialize(fstream);
            }
        }