Esempio n. 1
0
 public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix)
 {
     return(targetStepType == StepType &&
            descriptionPrefix + Description == target.Description &&
            target.TargetMethod == Name &&
            target.TargetType == DeclaringType);
 }
Esempio n. 2
0
        private static bool CleanAutowireMethodsTarget(TargetStepType targetStepType, TargetMethodCollection targetColl, List <MethodDescription> methodsToCreate)
        {
            List <OrmMethodTarget> targetsToRemove = new List <OrmMethodTarget>();

            foreach (OrmMethodTarget target in targetColl)
            {
                if (IsOpenSlxTarget(target))
                {
                    MethodDescription targetMatch = methodsToCreate.FirstOrDefault(x => x.MatchTarget(target, targetStepType, AUTOWIRE_HEADER));
                    if (targetMatch != null)
                    {
                        methodsToCreate.Remove(targetMatch);
                    }
                    else
                    {
                        targetsToRemove.Add(target);
                    }
                }
            }
            foreach (OrmMethodTarget target in targetsToRemove)
            {
                targetColl.Remove(target);
            }

            return(targetsToRemove.Count > 0);
        }
Esempio n. 3
0
 public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix)
 {
     return targetStepType == StepType &&
         descriptionPrefix + Description == target.Description &&
         target.TargetMethod == Name &&
         target.TargetType == DeclaringType;
 }
Esempio n. 4
0
        private static bool CleanAutowireMethodsTarget(TargetStepType targetStepType, TargetMethodCollection targetColl, List<MethodDescription> methodsToCreate)
        {
            List<OrmMethodTarget> targetsToRemove = new List<OrmMethodTarget>();
            foreach (OrmMethodTarget target in targetColl)
            {
                if (IsOpenSlxTarget(target))
                {
                    MethodDescription targetMatch = methodsToCreate.FirstOrDefault(x => x.MatchTarget(target, targetStepType, AUTOWIRE_HEADER));
                    if (targetMatch != null)
                    {
                        methodsToCreate.Remove(targetMatch);
                    }
                    else
                    {
                        targetsToRemove.Add(target);
                    }
                }
            }
            foreach (OrmMethodTarget target in targetsToRemove)
            {
                targetColl.Remove(target);
            }

            return targetsToRemove.Count > 0;
        }