Informationen ausgelagert Kleines Spy/Test Programm erstellt Mehr Exceptions/InvalidUpdateFileRequestException.cs Launcher Host in Download Server geändert Download Server macht zusätzlich Abfrage an den Hauptserver Download geht jetzt stückweise von statten
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using BS.SharedLauncher.Enums;
|
|
using BS.SharedLauncher.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace BS.SharedLauncher.DataContract
|
|
{
|
|
[DebuggerDisplay("{RelativePath} ({Checksum})")]
|
|
[DataContract, Serializable()]
|
|
public class UpdateFileDC
|
|
{
|
|
public UpdateFileDC()
|
|
{
|
|
|
|
}
|
|
|
|
public UpdateFileDC(FileInfo fileInfo, string relativeTo) : base()
|
|
{
|
|
Name = fileInfo.Name;
|
|
AbsolutePath = fileInfo.FullName;
|
|
RelativePath = PathUtils.MakeRelativePath(relativeTo, fileInfo.FullName);
|
|
Size = fileInfo.Length;
|
|
}
|
|
|
|
[DataMember, XmlAttribute]
|
|
public string Name { get; set; }
|
|
|
|
[XmlIgnore]
|
|
public string AbsolutePath { get; set; }
|
|
|
|
[DataMember, XmlAttribute]
|
|
public string RelativePath { get; set; }
|
|
|
|
[DataMember, XmlAttribute]
|
|
public UpdateFileSource Source { get; set; }
|
|
|
|
[DataMember, XmlAttribute]
|
|
public string Checksum { get; set; }
|
|
|
|
[DataMember, XmlAttribute]
|
|
public long Size { get; set; }
|
|
}
|
|
}
|