Ejemplo n.º 1
0
        public Archive Create(string archiveDirectory)
        {
            DirectoryContent   directoryContent = new DirectoryContent(archiveDirectory);
            ArchiveDescription description      = ReadDescription(directoryContent);

            return(new Archive(directoryContent, description));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 输出新的描述到;
 /// </summary>
 private void WriteDescription(Content content, ArchiveDescription description)
 {
     using (content.BeginUpdateAuto())
     {
         using (var stream = content.GetOutputStream(DescriptionFileName))
         {
             descriptionSerializer.Serialize(stream, description);
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 指定存档路径,信息,但不进行创建存档;
 /// </summary>
 public ArchiveInfo(ArchiveDescription description, string directory) : this(description, new DirectoryInfo(directory))
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 指定存档路径,信息,但不进行创建存档;
 /// </summary>
 public ArchiveInfo(ArchiveDescription description, DirectoryInfo directoryInfo)
 {
     DirectoryInfo = directoryInfo;
     Description   = description;
 }
Ejemplo n.º 5
0
 public Archive(Content content, ArchiveDescription description)
 {
     BaseContent = content;
     Description = description;
 }