public InternalFile CreateManifestFile() { var sb = new StringBuilder(); sb.AppendLine("Manifest======"); sb.AppendLine(); if (IPAddress != null) { sb.AppendLine("SourceIP: " + IPAddress); } sb.AppendLine("Received: " + Received.ToLongDateString() + " " + Received.ToLongTimeString()); sb.AppendLine(); foreach (var file in Files) { sb.Append(file.Filename); sb.Append(" [size="); sb.Append(file.Stream.Length); sb.AppendLine("]"); } var packageFile = new InternalFile("_Manifest.txt", sb.ToString(), "text/plain"); return(packageFile); }
public void Add(InternalFile packageFile) { Files.Add(packageFile); }