aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-10 19:17:08 +0800
committercrupest <crupest@outlook.com>2021-02-10 19:17:08 +0800
commit02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a (patch)
treee9aa1c65da78f643cad2b716f4b0dbf3506cc7aa /BackEnd/Timeline/Models
parent872f0e9f094f37db9ff208d178ad5bea2fafc1a7 (diff)
downloadtimeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.tar.gz
timeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.tar.bz2
timeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models')
-rw-r--r--BackEnd/Timeline/Models/ByteData.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Models/ByteData.cs b/BackEnd/Timeline/Models/ByteData.cs
index 7b832eb5..a1a0c238 100644
--- a/BackEnd/Timeline/Models/ByteData.cs
+++ b/BackEnd/Timeline/Models/ByteData.cs
@@ -1,4 +1,5 @@
-using NSwag.Annotations;
+using System;
+using NSwag.Annotations;
namespace Timeline.Models
{
@@ -14,6 +15,11 @@ namespace Timeline.Models
/// <param name="contentType">The content type.</param>
public ByteData(byte[] data, string contentType)
{
+ if (data is null)
+ throw new ArgumentNullException(nameof(data));
+ if (contentType is null)
+ throw new ArgumentNullException(nameof(contentType));
+
Data = data;
ContentType = contentType;
}