init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
using System.Reflection;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Converter;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Logic
|
||||
{
|
||||
public static class HashLogic
|
||||
{
|
||||
private static string GetNonce() => Assembly.GetExecutingAssembly().GetName().Version.ToString().Replace(".", "_");
|
||||
public static string CreateSourceHash<T>(T responseCO) where T : class, new()
|
||||
=> (responseCO != null) ? CustomJsonConverter.SerializeObjectToJson(responseCO)?.GetHashCode().ToString() + "__" + GetNonce() : null;
|
||||
|
||||
//public static string CreateResponseHash<T>(T responseCO, string requestHash) where T : class, IGetResponseCo, new()
|
||||
// => (responseCO != null && !responseCO.Hash.Equals(requestHash)) ? responseCO.Hash : null;
|
||||
//public static T CreateResponseData<T>(T responseCO, string requestHash) where T : class, IGetResponseCo, new()
|
||||
// => (responseCO != null && !responseCO.Hash.Equals(requestHash)) ? responseCO : null;
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue