Exemplo n.º 1
0
 /// <summary>
 /// Writes a directory reference  to a binary archive
 /// </summary>
 /// <param name="Writer">The writer to output data to</param>
 /// <param name="Directory">The item to write</param>
 public static void WriteDirectoryReference(this BinaryArchiveWriter Writer, DirectoryReference Directory)
 {
     if (Directory == null)
     {
         Writer.WriteString(null);
     }
     else
     {
         Writer.WriteString(Directory.FullName);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Writes a FileReference to a binary archive
 /// </summary>
 /// <param name="Writer">The writer to output data to</param>
 /// <param name="File">The file reference to write</param>
 public static void WriteFileReference(this BinaryArchiveWriter Writer, FileReference File)
 {
     if (File == null)
     {
         Writer.WriteString(null);
     }
     else
     {
         Writer.WriteString(File.FullName);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Writes a ContentHash to a binary archive
 /// </summary>
 /// <param name="Writer">The writer to output data to</param>
 /// <param name="Hash">The hash to write</param>
 public static void WriteContentHash(this BinaryArchiveWriter Writer, ContentHash Hash)
 {
     if (Hash == null)
     {
         Writer.WriteByteArray(null);
     }
     else
     {
         Writer.WriteByteArray(Hash.Bytes);
     }
 }