public T PaseBody <T>() { var dataStr = JsonPase.Serialize(this.Body); var data = JsonPase.Deserialize <T>(dataStr); return(data); }
internal byte[] GetData() { var dataStr = JsonPase.Serialize(this); var dataBytes = Encoding.UTF8.GetBytes(dataStr); return(dataBytes); }
public string ToToken() { IEncrypted encrypted = new AesEncrypt(DEFAULTKEY, DEFAULTIV); var str = JsonPase.Serialize(this); var data = encrypted.CryptStr(str); return(data); }
public override void OnActionExecuting(HttpActionContext actionContext) { StoreAutorizeFilterService storeAutorizeFilterService = new StoreAutorizeFilterService(actionContext); var anoymous = storeAutorizeFilterService.CanAnoymousScan(); if (!anoymous) { var response = storeAutorizeFilterService.GetTokenModelResponse(); if (!response.issuccess) { actionContext.Response = new HttpResponseMessage(System.Net.HttpStatusCode.Accepted); actionContext.Response.Content = new StringContent(JsonPase.Serialize(response)); return; } } base.OnActionExecuting(actionContext); }