init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
internal class FileUploadFailureResponse
|
||||
{
|
||||
[JsonProperty("uzenet")]
|
||||
public string Uzenet { get; set; }
|
||||
|
||||
[JsonProperty("hibaAzonosito")]
|
||||
public Guid HibaAzonosito { get; set; }
|
||||
|
||||
[JsonProperty("datumUtc")]
|
||||
public DateTime DatumUtc { get; set; }
|
||||
|
||||
[JsonProperty("megnevezes")]
|
||||
public string Megnevezes { get; set; }
|
||||
}
|
||||
}
|
|
@ -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; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
internal class FileUploadSuccessResponse
|
||||
{
|
||||
[JsonProperty(PropertyName = "fajlId")]
|
||||
private Guid FajlAzonositoV3 { set { FajlAzonosito = value; } }
|
||||
|
||||
[JsonProperty(PropertyName = "fajlAzonosito")]
|
||||
public Guid FajlAzonosito { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "utvonal")]
|
||||
public string Utvonal { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "fajlMeretByteLength")]
|
||||
public int FajlMeretByteLength { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue