init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
46
Kreta.Client/FileService/Response/GetUrl/GetUrlResponse.cs
Normal file
46
Kreta.Client/FileService/Response/GetUrl/GetUrlResponse.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
public class GetUrlResponse : IResponse
|
||||
{
|
||||
public GetUrlResponse() { }
|
||||
|
||||
public GetUrlResponse(bool tryAgain)
|
||||
{
|
||||
TryAgain = tryAgain;
|
||||
}
|
||||
|
||||
public GetUrlResponse(string error)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
Error = error;
|
||||
}
|
||||
|
||||
internal static GetUrlResponse GetUrlResponseWithUrl(string url)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(url))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(url));
|
||||
}
|
||||
|
||||
return new GetUrlResponse
|
||||
{
|
||||
IsSuccess = true,
|
||||
Url = url,
|
||||
};
|
||||
}
|
||||
|
||||
public bool IsSuccess { get; private set; }
|
||||
|
||||
public string Url { get; private set; }
|
||||
|
||||
public string Error { get; }
|
||||
|
||||
public bool TryAgain { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue