public override bool IsValid(IActusReus criminalAct, params ILegalPerson[] persons) { var steal = criminalAct as ConsolidatedTheft; if (steal == null) { AddReasonEntry($"{nameof(FiduciaryRelationship)} is an {nameof(IAttendantElement)} " + $"only upon type {nameof(ByTaking)}"); return(base.IsValid(criminalAct, persons)); } var defendant = this.Defendant(persons); if (defendant == null) { return(false); } var defendantTitle = defendant.GetLegalPersonTypeName(); var victims = persons.Victims().ToList(); if (!victims.Any()) { return(false); } foreach (var victim in victims) { var victimTitle = victim.GetLegalPersonTypeName(); var isTrust = IsTrustBetween(defendant, victim); var isConfident = IsConfidenceBetween(defendant, victim); AddReasonEntry($"{defendantTitle} {defendant.Name}, {nameof(IsTrustBetween)} " + $"is {isTrust} for {victimTitle} {victim.Name}"); AddReasonEntry($"{defendantTitle} {defendant.Name}, {nameof(IsConfidenceBetween)} " + $"is {isConfident} for {victimTitle} {victim.Name}"); if (isTrust || isConfident) { return(true); } } return(false); }
public override bool IsValid(IActusReus criminalAct, params ILegalPerson[] persons) { var theft = criminalAct as ByDeception; if (theft == null || persons == null || !persons.Any()) { return(base.IsValid(criminalAct, persons)); } var defendant = this.Defendant(persons); if (defendant == null) { return(false); } var victims = persons.Victims().ToList(); if (!victims.Any()) { return(false); } foreach (var victim in victims) { var isReliance = IsReliantOnFalseRepresentation(victim); var victimTitle = victim.GetLegalPersonTypeName(); if (isReliance) { AddReasonEntry($"{victimTitle} {victim.Name}, " + $"{nameof(IsReliantOnFalseRepresentation)} is {isReliance}"); } return(isReliance); } return(false); }
public virtual bool CompareTo(IActusReus criminalAct, params ILegalPerson[] persons) { return(true); }
public override bool CompareTo(IActusReus criminalAct, params ILegalPerson[] persons) { return(_intent.CompareTo(criminalAct)); }
public virtual bool IsValid(IActusReus criminalAct, params ILegalPerson[] persons) { return(false); }