init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
public class FileUploadResponse : IResponse
|
||||
{
|
||||
public FileUploadResponse() { }
|
||||
|
||||
public FileUploadResponse(bool tryAgain)
|
||||
{
|
||||
TryAgain = tryAgain;
|
||||
}
|
||||
|
||||
public FileUploadResponse(string error)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
Error = error;
|
||||
}
|
||||
|
||||
public FileUploadResponse(Guid fajlAzonosito, string utvonal, int fajlMeretByteLength)
|
||||
{
|
||||
if (fajlAzonosito == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentException(nameof(fajlAzonosito));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(utvonal))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(utvonal));
|
||||
}
|
||||
|
||||
if (fajlMeretByteLength < 1)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(fajlMeretByteLength));
|
||||
}
|
||||
|
||||
IsSuccess = true;
|
||||
FajlAzonosito = fajlAzonosito;
|
||||
Utvonal = utvonal;
|
||||
FajlMeretByteLength = fajlMeretByteLength;
|
||||
}
|
||||
|
||||
public bool IsSuccess { get; }
|
||||
|
||||
public Guid FajlAzonosito { get; }
|
||||
|
||||
public string Utvonal { get; }
|
||||
|
||||
public int FajlMeretByteLength;
|
||||
|
||||
public string Error { get; }
|
||||
|
||||
public bool TryAgain { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue