public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix) { return(targetStepType == StepType && descriptionPrefix + Description == target.Description && target.TargetMethod == Name && target.TargetType == DeclaringType); }
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); }
public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix) { return targetStepType == StepType && descriptionPrefix + Description == target.Description && target.TargetMethod == Name && target.TargetType == DeclaringType; }
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; }