Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public virtual bool CompareTo(IActusReus criminalAct, params ILegalPerson[] persons)
 {
     return(true);
 }
Пример #4
0
 public override bool CompareTo(IActusReus criminalAct, params ILegalPerson[] persons)
 {
     return(_intent.CompareTo(criminalAct));
 }
Пример #5
0
 public virtual bool IsValid(IActusReus criminalAct, params ILegalPerson[] persons)
 {
     return(false);
 }