diff options
author | crupest <crupest@outlook.com> | 2021-02-10 19:17:08 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-10 19:17:08 +0800 |
commit | 02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a (patch) | |
tree | e9aa1c65da78f643cad2b716f4b0dbf3506cc7aa /BackEnd/Timeline/Models | |
parent | 872f0e9f094f37db9ff208d178ad5bea2fafc1a7 (diff) | |
download | timeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.tar.gz timeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.tar.bz2 timeline-02beb8b7fa3b8e5fe33307dd63de92d1c9bfaf0a.zip |
...
Diffstat (limited to 'BackEnd/Timeline/Models')
-rw-r--r-- | BackEnd/Timeline/Models/ByteData.cs | 8 |
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;
}
|