Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="names"></param>
 protected void WriteStubElements(IEnumerable <string> names)
 {
     foreach (var name in names)
     {
         Persister.Commit(
             new VcsCommit {
             File = new FileDescriptor {
                 Path = name
             }
         },
             GenerateStreamFromString(
                 Guid.NewGuid().ToString()
                 )
             );
     }
 }
 /// <summary>
 ///     Запись файла в хранилище
 /// </summary>
 /// <param name="file">Представление файла</param>
 /// <param name="stream">Поток-источник</param>
 /// <returns></returns>
 public IFile Set(IFileDescriptor file, Stream stream)
 {
     return(new FileVcsStorageBased(
                VcsStoragePersister.Commit(new VcsCommit {
         File = file
     }, stream).File,
                VcsStoragePersister
                ));
 }