init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
36
Kreta.Client/FileService/Request/DKT_FileUploadRequest.cs
Normal file
36
Kreta.Client/FileService/Request/DKT_FileUploadRequest.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class DKT_FileUploadRequest : IFileUploadRequest
|
||||
{
|
||||
public DKT_FileUploadRequest(string fileName, byte[] content, string contentType, string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(fileName))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(fileName));
|
||||
}
|
||||
|
||||
if (content?.Length == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(content));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(contentType))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(contentType));
|
||||
}
|
||||
|
||||
FileName = fileName;
|
||||
Path = path;
|
||||
Content = content;
|
||||
ContentType = contentType;
|
||||
}
|
||||
|
||||
public string FileName { get; }
|
||||
public string Path { get; }
|
||||
public byte[] Content { get; }
|
||||
|
||||
public string ContentType { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue