/// <summary> /// Checks if the given parameters constitute a match for this <see cref="Acl"/> object. /// </summary> /// <param name="authentication">The signatures available.</param> /// <param name="path">The path of the record being tested.</param> /// <param name="recursiveOnly">Whether this object must be a recursive permission.</param> /// <param name="recordName">The name of the record being tested.</param> /// <returns>A boolean indicating whether the given parameters match.</returns> public bool IsMatch(IReadOnlyList <SignatureEvidence> authentication, LedgerPath path, bool recursiveOnly, string recordName) { return(Path.FullPath == path.FullPath && (!recursiveOnly || Recursive) && RecordName.IsMatch(recordName) && Subjects.Any(subject => subject.IsMatch(authentication))); }
public override int GetHashCode() { int result = 1; result = result * HASH_CODE_PRIME + RecordName.GetHashCode(); result = result * HASH_CODE_PRIME + SubRecordName.GetHashCode(); return(result); }