Refactor SelfUpdater adding L0 tests. (#1564)

* Refactor SelfUpdater with L0 tests.

* .

* .
This commit is contained in:
Tingluo Huang
2021-12-20 00:37:14 -05:00
committed by GitHub
parent 3e65909b81
commit d0ab54ce45
3 changed files with 432 additions and 186 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace GitHub.DistributedTask.WebApi
@@ -59,10 +60,21 @@ namespace GitHub.DistributedTask.WebApi
set;
}
/// <summary>
/// File ID in file service
/// </summary>
[DataMember(EmitDefaultValue = false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public Int32? FileId
{
get;
set;
}
/// <summary>
/// Auth token to download the package
/// </summary>
[DataMember]
[DataMember(EmitDefaultValue = false)]
public String Token
{
get;
@@ -70,7 +82,7 @@ namespace GitHub.DistributedTask.WebApi
}
/// <summary>
/// MD5 hash as a base64 string
/// SHA256 hash
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String HashValue
@@ -90,7 +102,7 @@ namespace GitHub.DistributedTask.WebApi
}
/// <summary>
/// The UI uses this to display instructions, i.e. "unzip MyAgent.zip"
/// The UI uses this to display instructions, e.g. "unzip MyAgent.zip"
/// </summary>
[DataMember]
public String Filename