aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/ByteData.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-12 22:39:57 +0800
committerGitHub <noreply@github.com>2021-02-12 22:39:57 +0800
commit94eba6cda12010c8657f0e7c5e6977a8d3b46e8c (patch)
treed6638f60df77ed97fc70f1750f90019c2bb9e9c1 /BackEnd/Timeline/Models/ByteData.cs
parenta759460ad757922e761a07504bcdea7eeaa07860 (diff)
parent83910122bfd0aa9bd207b6d5f631774415312716 (diff)
downloadtimeline-94eba6cda12010c8657f0e7c5e6977a8d3b46e8c.tar.gz
timeline-94eba6cda12010c8657f0e7c5e6977a8d3b46e8c.tar.bz2
timeline-94eba6cda12010c8657f0e7c5e6977a8d3b46e8c.zip
Merge pull request #267 from crupest/backend
春节大换血 Spring festival big change.
Diffstat (limited to 'BackEnd/Timeline/Models/ByteData.cs')
-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;
}