public override bool Equals(object o) { if (this == o) { return(true); } if (!(o is Aes128CtrKdfParams)) { return(false); } var that = (Aes128CtrKdfParams)o; if (Dklen != that.Dklen) { return(false); } if (C != that.C) { return(false); } if (!Prf?.Equals(that.Prf) ?? that.Prf != null) { return(false); } return(Salt?.Equals(that.Salt) ?? that.Salt == null); }
/// <summary> /// Add Created Perf Record /// </summary> private void Pa(Prf CurrLog, Cx CurrCodeType, string Comments = null) { if (C == null || C.P != true || CurrLog == null) { return; } var Log = CurrLog; if (C.Pr == true && CurrCodeType != null && CurrCodeType.S != null && CurrCodeType.S.Pr == true) { Log.Ie = Pp(CurrCodeType); } Log.C = Comments; var End = _.d; Log.De = End; Log.T = (End - Log.Ds).Ticks; Log.Ms = (End - Log.Ds).TotalMilliseconds; L.P.Add(Log); Rn++; if (Rl > 1 && Rn > Rl) { Sv(); } }
public override int GetHashCode() { int result = Dklen; result = 31 * result + C; result = 31 * result + (Prf != null ? Prf.GetHashCode() : 0); result = 31 * result + (Salt != null ? Salt.GetHashCode() : 0); return(result); }
/// <summary> /// Run Common Sync Try FuncToRunSync With Errors And Performance Logging based on CurrCodeType. /// Logging is saved to CustomLogToAddRecords or default static logs (_.D.L) /// </summary> public static T r <T>(this Lg CurrLog, f <T> FuncToRunSync, Cx CustomCodeType = null, Mx CustomMethodContext = null, T ReturnOnError = default) { if (FuncToRunSync == null) { return(ReturnOnError); } var t = CustomCodeType; Prf PerfLog = null; var ef = false; if (t.S != null && t.S.P == true) { PerfLog = CurrLog.P(t, CustomMethodContext); } T Result = ReturnOnError; if (CustomCodeType.T) { try { Result = FuncToRunSync(); } catch (Exception exc) { if (t.S != null && t.S.L == true) { CurrLog.E(null, exc, t, CustomMethodContext); } ef = true; } } else { Result = FuncToRunSync(); } if (t.S != null && t.S.P == true) { CurrLog.Pa(PerfLog, null, t); } if (ef) { return(ReturnOnError); } return(Result); }
//Умножение и деление private void UiD() { instr.text = " "; int z = Random.Range(1, 3); int n = Random.Range(2, 11); switch (z) { case 1: do { int y = Random.Range(2000, 10000); }while (y % n != 0); int Ch = y / n; int Chf; do { Chf = Random.Range(Ch - 100, Ch + 100); }while (Chf == Ch && Chf <= 0); quest.text = y + "/" + n; tr.text = Ch.ToString(); fal.text = Chf.ToString(); break; case 2: int b = Random.Range(2000, 10000); int Pr = b * n; int Prf; do { Prf = Random.Range(Pr - 900, Pr + 900); }while (Prf <= 0 && Pr == Prf); quest.text = b + "*" + n; tr.text = Pr.ToString(); fal.text = Prf.ToString(); break; } }
/// <summary> /// Create New Log Entry /// </summary> private Prf Pn(Cx CurrCodeType, Mx CustomMethodContext = null) { if (C == null || C.P != true) { return(null); } Ce(CurrCodeType, CustomMethodContext); Prf r = new Prf(); if (C.Pr == true && CurrCodeType != null && CurrCodeType.S != null && CurrCodeType.S.Pr == true) { r.Is = Pp(CurrCodeType); } if (CurrCodeType != null) { r.X = CurrCodeType.CxId; } if (CustomMethodContext != null) { r.M = CustomMethodContext.CmId; } return(r); }
/// <summary> /// Add Created Performance Log Record To Storage /// </summary> public void Pa(Prf Log, string CustomComments = null, Cx CurrCodeType = null) { Pa(Log, CurrCodeType, CustomComments); }