You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
992 B
32 lines
992 B
using Microsoft.AspNetCore.Http; |
|
using Microsoft.Extensions.DependencyInjection; |
|
using SqlSugar; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Text; |
|
|
|
namespace ReZero.SuperAPI |
|
{ |
|
public class InterfaceContext |
|
{ |
|
public InterfaceType InterfaceType { get; internal set; } |
|
public HttpContext? HttpContext { get; internal set; } |
|
public DataModel? DataModel { get; internal set; } |
|
public ZeroInterfaceList? InterfaceInfo { get; internal set; } |
|
public Exception? Exception { get; internal set; } |
|
public ServiceProvider? ServiceProvider { get; internal set; } |
|
|
|
public void AttachClaimToHttpContext(string claimKey, object claimValue) |
|
{ |
|
if (DataModel != null&& !DataModel.ClaimList!.ContainsKey(claimKey)) |
|
{ |
|
DataModel!.ClaimList!.Add(claimKey, claimValue); |
|
} |
|
} |
|
} |
|
public enum InterfaceType |
|
{ |
|
DynamicApi, |
|
SystemApi, |
|
} |
|
}
|
|
|