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; }
|
||||
}
|
||||
}
|
34
Kreta.Client/FileService/Request/FileDeleteRequest.cs
Normal file
34
Kreta.Client/FileService/Request/FileDeleteRequest.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Kreta.Client.FileService.Constant;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class FileDeleteRequest
|
||||
{
|
||||
public FileDeleteRequest(string utvonal, Guid fajlAzonosito)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(utvonal))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(utvonal));
|
||||
}
|
||||
|
||||
if (fajlAzonosito == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentException(nameof(fajlAzonosito));
|
||||
}
|
||||
|
||||
Utvonal = utvonal;
|
||||
FajlAzonosito = fajlAzonosito;
|
||||
}
|
||||
|
||||
[JsonProperty(PropertyName = "konyvtar")]
|
||||
public string Konyvtar => Folder.HaziFeladatok;
|
||||
|
||||
[JsonProperty(PropertyName = "utvonal")]
|
||||
public string Utvonal { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "fajlAzonosito")]
|
||||
public Guid FajlAzonosito { get; set; }
|
||||
}
|
||||
}
|
27
Kreta.Client/FileService/Request/FileFinalizeRequest.cs
Normal file
27
Kreta.Client/FileService/Request/FileFinalizeRequest.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Client.FileService.Constant;
|
||||
using Kreta.Client.FileService.Model;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class FileFinalizeRequest
|
||||
{
|
||||
public FileFinalizeRequest(List<FileData> fajlok)
|
||||
{
|
||||
if (fajlok?.Count == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(fajlok));
|
||||
}
|
||||
|
||||
Fajlok = fajlok;
|
||||
}
|
||||
|
||||
[JsonProperty(PropertyName = "konyvtar")]
|
||||
public string Konyvtar => Folder.HaziFeladatok;
|
||||
|
||||
[JsonProperty(PropertyName = "fajlok")]
|
||||
public List<FileData> Fajlok { get; }
|
||||
}
|
||||
}
|
15
Kreta.Client/FileService/Request/FileFinalizeRequestV3.cs
Normal file
15
Kreta.Client/FileService/Request/FileFinalizeRequestV3.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class FileFinalizeRequestV3
|
||||
{
|
||||
[JsonProperty(PropertyName = "fajlId")]
|
||||
public Guid FajlId { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "utvonal")]
|
||||
public string Utvonal { get; }
|
||||
|
||||
}
|
||||
}
|
34
Kreta.Client/FileService/Request/FileUploadRequest.cs
Normal file
34
Kreta.Client/FileService/Request/FileUploadRequest.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class FileUploadRequest : IFileUploadRequest
|
||||
{
|
||||
public 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));
|
||||
}
|
||||
|
||||
Path = path;
|
||||
FileName = fileName;
|
||||
Content = content;
|
||||
ContentType = contentType;
|
||||
}
|
||||
public string Path { get; }
|
||||
public string FileName { get; }
|
||||
public byte[] Content { get; }
|
||||
public string ContentType { get; }
|
||||
}
|
||||
}
|
38
Kreta.Client/FileService/Request/GetUrlRequest.cs
Normal file
38
Kreta.Client/FileService/Request/GetUrlRequest.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Kreta.Client.FileService.Constant;
|
||||
|
||||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public class GetUrlRequest
|
||||
{
|
||||
public GetUrlRequest(string utvonal, Guid fajlAzonosito, string fajlNev)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(utvonal))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(utvonal));
|
||||
}
|
||||
|
||||
if (fajlAzonosito == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentException(nameof(fajlAzonosito));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(fajlNev))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(fajlNev));
|
||||
}
|
||||
|
||||
Utvonal = utvonal;
|
||||
FajlAzonosito = fajlAzonosito;
|
||||
FajlNev = fajlNev;
|
||||
}
|
||||
|
||||
public string Konyvtar => Folder.HaziFeladatok;
|
||||
|
||||
public string Utvonal { get; set; }
|
||||
|
||||
public Guid FajlAzonosito { get; }
|
||||
|
||||
public string FajlNev { get; }
|
||||
}
|
||||
}
|
11
Kreta.Client/FileService/Request/IFileUploadRequest.cs
Normal file
11
Kreta.Client/FileService/Request/IFileUploadRequest.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.Client.FileService.Request
|
||||
{
|
||||
public interface IFileUploadRequest
|
||||
{
|
||||
string FileName { get; }
|
||||
string Path { get; }
|
||||
byte[] Content { get; }
|
||||
string ContentType { get; }
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue