-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Huaxing YUAN
authored and
Huaxing YUAN
committed
Dec 31, 2024
1 parent
d48296d
commit b1b7797
Showing
11 changed files
with
243 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AxaFrance.WebEngine.Web | ||
{ | ||
internal class JSErrors | ||
{ | ||
public string Message { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AxaFrance.WebEngine.Web | ||
{ | ||
|
||
/// <summary> | ||
/// A network request record, which is used to store the information of a network request initiated by the browser. | ||
/// </summary> | ||
[Serializable] | ||
public class NetworkRequest | ||
{ | ||
/// <summary> | ||
/// The time stamp of the network request. | ||
/// </summary> | ||
public long TimeStamp { get; set; } | ||
|
||
/// <summary> | ||
/// The request id of the network request. | ||
/// </summary> | ||
public string RequestId { get; set; } | ||
|
||
/// <summary> | ||
/// The http method of the network request. | ||
/// </summary> | ||
public string Method { get; set; } | ||
|
||
/// <summary> | ||
/// The url of the network request. | ||
/// </summary> | ||
public string Url { get; set; } | ||
|
||
/// <summary> | ||
/// If the request is cached (to ignore the calculation of downloaded size) | ||
/// </summary> | ||
public bool IsCached { get; set; } | ||
|
||
/// <summary> | ||
/// The size of the request. | ||
/// </summary> | ||
public long Request { get; set; } | ||
|
||
/// <summary> | ||
/// The size of the response. | ||
/// </summary> | ||
public long Reponse { get; set; } | ||
|
||
/// <summary> | ||
/// The status code of the network request. | ||
/// </summary> | ||
public long StatusCode { get; set; } | ||
|
||
/// <summary> | ||
/// The type of the resource. | ||
/// </summary> | ||
public string ResourceType { get; set; } | ||
|
||
/// <summary> | ||
/// The date and time when the request was sent to server | ||
/// </summary> | ||
public DateTime? Sent { get; set; } | ||
|
||
/// <summary> | ||
/// The date and time when the response was received from server | ||
/// </summary> | ||
public DateTime? Received { get; set; } | ||
|
||
/// <summary> | ||
/// The duration of the network request. | ||
/// </summary> | ||
public TimeSpan? Duration | ||
{ | ||
get | ||
{ | ||
if (Sent != null && Received != null) | ||
{ | ||
return Received - Sent; | ||
} | ||
else | ||
{ | ||
return null; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.