This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppError | |
{ | |
public string Message { get; set; } | |
// object pour la sérialisation | |
public object? Details { get; set; } | |
public ErrorKeys ErrorKey { get; set; } | |
public HttpStatusCode StatusCode { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AlgoComputeException : ExceptionBase, IHasErrorDetails | |
{ | |
public IErrorDetails ErrorDetails { get; } | |
public override ErrorKeys ErrorKey => ErrorKeys.InvalidNumber; | |
public AlgoComputeException(string? message, AlgoComputeErrorDetails errorPayload) : base(message) | |
{ | |
ErrorDetails = errorPayload; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IHasErrorDetails | |
{ | |
public IErrorDetails ErrorDetails { get; } | |
} | |
public interface IErrorDetails { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ExceptionBase : Exception | |
{ | |
public abstract ErrorKeys ErrorKey { get; } | |
public ExceptionBase(string? message) : base(message) | |
{ | |
} | |
} | |
public enum ErrorKeys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExceptionMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
public ExceptionMiddleware(RequestDelegate next) | |
{ | |
_next = next; | |
} | |
public async Task InvokeAsync(HttpContext httpContext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppError | |
{ | |
public string Message { get; set; } | |
// object pour la sérialisation | |
public object? Details { get; set; } | |
public ErrorKeys ErrorKey { get; set; } | |
public HttpStatusCode StatusCode { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="com.elior.poc://">Url Scheme</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var state = new RequestState | |
{ | |
AccountId = command.User.AccountId, | |
CreationDate = DateTime.UtcNow, | |
StateId = RequestStateEnum.Requested, | |
Payload = Json.Serialize(serviceModel) | |
}; | |
request.States.Add(state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Converter used to compare some methods to get a SolidColorBrush from string hex/name colors | |
/// With the help of Jerome Giacomini (http://jeromegiacomini.net/Blog/2015/08/20/convertir-des-couleurs-hexa-et-des-colorname-en-solidcolorbrush/) | |
/// And Jonathan Antoine (http://blogs.infinitesquare.com/b/jonathan/archives/astuce-windowsphone-creer-un-objet-%E2%80%98color-a-partir-de-sa-chaine-hexadecimale-string#.VdYkOPntlBd) | |
/// </summary> | |
public static class ConverterHelper | |
{ | |
/// <summary> | |
/// Gets or sets the limit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ConverterHelper | |
{ | |
/// <summary> | |
/// Gets or sets the limit. | |
/// </summary> | |
/// <value> | |
/// The limit. | |
/// </value> | |
public const int Limit = 20; |
NewerOlder