public override string Handle(IFamilyMember source, IFamilyMember target)
 {
     if (target.GetFactValue <int>(FactType.YPosition) < -1 && !target.HasFact(FactType.Ancestor))
     {
         return(string.Format("{0}{1}",
                              GetGreatness(target.GetFactValue <int>(FactType.YPosition)),
                              target.Gender == Gender.Female ? RelationshipType.Aunt.ToString() : RelationshipType.Uncle.ToString()));
     }
     else
     {
         return(successor.Handle(source, target));
     }
 }
 public override string Handle(IFamilyMember source, IFamilyMember target)
 {
     if (target.GetFactValue <int>(FactType.YPosition) > 1 && target.HasFact(FactType.Ancestor))
     {
         return(string.Format("{0}{1}",
                              GetGreatness(target.GetFactValue <int>(FactType.YPosition)),
                              RelationshipType.Grandchild));
     }
     else
     {
         return(successor.Handle(source, target));
     }
 }
 public override string Handle(IFamilyMember source, IFamilyMember target)
 {
     if (target.GetFactValue <int>(FactType.YPosition) == 1 && !target.HasFact(FactType.Ancestor))
     {
         return(target.Gender == Gender.Female ? RelationshipType.Niece.ToString() : RelationshipType.Nephew.ToString());
     }
     else
     {
         return(successor.Handle(source, target));
     }
 }
Ejemplo n.º 4
0
 public override string Handle(IFamilyMember source, IFamilyMember target)
 {
     if (target.GetFactValue <int>(FactType.YPosition) == -1 && target.HasFact(FactType.Ancestor))
     {
         return(RelationshipType.Parent.ToString());
     }
     else
     {
         return(successor.Handle(source, target));
     }
 }
Ejemplo n.º 5
0
        public override string Handle(IFamilyMember source, IFamilyMember target)
        {
            var isEx = source.IsDivorcedFrom(target);

            if (target.GetFactValue <int>(FactType.YPosition) == 0 && !source.IsMarriedTo(target) && !isEx)
            {
                return(RelationshipType.Sibling.ToString());
            }
            else
            {
                return(successor.Handle(source, target));
            }
        }
Ejemplo n.º 6
0
        public override string Handle(IFamilyMember source, IFamilyMember target)
        {
            var isEx = source.IsDivorcedFrom(target);

            if (target.GetFactValue <int>(FactType.YPosition) == 0 && (source.IsMarriedTo(target) || isEx))
            {
                return(string.Format("{0}{1}",
                                     isEx ? (RelationshipModifier.Ex.ToString() + "-") : string.Empty,
                                     RelationshipType.Spouse.ToString()));
            }
            else
            {
                return(successor.Handle(source, target));
            }
        }
 public override string Execute(IFamilyMember source, IFamilyMember target)
 {
     return(string.Format("{0}{1}",
                          GetCousinhoodPart(target.GetFactValue <int>(FactType.XPosition)),
                          GetRemovalPart(target.GetFactValue <int>(FactType.YPosition))));
 }