private static sCTorParams ZCTorParams(IList <cFilter> pTerms) { if (pTerms == null) { throw new ArgumentNullException(nameof(pTerms)); } if (pTerms.Count < 2) { throw new ArgumentOutOfRangeException(nameof(pTerms)); } sCTorParams lParams = new sCTorParams(); foreach (var lTerm in pTerms) { if (lTerm == null) { throw new ArgumentOutOfRangeException(nameof(pTerms), "null list elements"); } if (lTerm.ContainsMessageHandles) { lParams.ContainsMessageHandles = true; } if (lParams.UIDValidity == null) { lParams.UIDValidity = lTerm.UIDValidity; } else if (lTerm.UIDValidity != null && lTerm.UIDValidity != lParams.UIDValidity) { throw new ArgumentOutOfRangeException(nameof(pTerms)); } } return(lParams); }
private static sCTorParams ZCTorParams(cFilter pA, cFilter pB) { if (pA == null) { throw new ArgumentNullException(nameof(pA)); } if (pB == null) { throw new ArgumentNullException(nameof(pB)); } sCTorParams lParams = new sCTorParams(); if (pA.ContainsMessageHandles || pB.ContainsMessageHandles) { lParams.ContainsMessageHandles = true; } if (pA.UIDValidity == null) { lParams.UIDValidity = pB.UIDValidity; } else if (pB.UIDValidity == null) { lParams.UIDValidity = pA.UIDValidity; } else if (pA.UIDValidity != pB.UIDValidity) { throw new ArgumentOutOfRangeException(); } else { lParams.UIDValidity = pA.UIDValidity; } return(lParams); }
/// <summary> /// /// </summary> /// <param name="pParams"></param> protected cFilter(sCTorParams pParams) { ContainsMessageHandles = pParams.ContainsMessageHandles; UIDValidity = pParams.UIDValidity; }