public MessageCollection CheckType (TypeDefinition type, Runner runner) { messageCollection = new MessageCollection (); codeDuplicatedLocator = new CodeDuplicatedLocator (); ICollection siblingClasses = Utilities.GetInheritedClassesFrom (type); if (siblingClasses.Count >= 2) CompareSiblingClasses (siblingClasses); if (messageCollection.Count == 0) return null; return messageCollection; }
public MessageCollection CheckType (TypeDefinition typeDefinition, Runner runner) { messageCollection = new MessageCollection (); CodeDuplicatedLocator codeDuplicatedLocator = new CodeDuplicatedLocator (); foreach (MethodDefinition currentMethod in typeDefinition.Methods) { foreach (Message message in codeDuplicatedLocator.CompareMethodAgainstTypeMethods (currentMethod, typeDefinition)) { messageCollection.Add (message); } codeDuplicatedLocator.CheckedMethods.Add (currentMethod.Name); } if (messageCollection.Count == 0) return null; return messageCollection; }
public MessageCollection CheckType(TypeDefinition type, Runner runner) { messageCollection = new MessageCollection(); codeDuplicatedLocator = new CodeDuplicatedLocator(); ICollection siblingClasses = Utilities.GetInheritedClassesFrom(type); if (siblingClasses.Count >= 2) { CompareSiblingClasses(siblingClasses); } if (messageCollection.Count == 0) { return(null); } return(messageCollection); }
public MessageCollection CheckType(TypeDefinition typeDefinition, Runner runner) { messageCollection = new MessageCollection(); CodeDuplicatedLocator codeDuplicatedLocator = new CodeDuplicatedLocator(); foreach (MethodDefinition currentMethod in typeDefinition.Methods) { foreach (Message message in codeDuplicatedLocator.CompareMethodAgainstTypeMethods(currentMethod, typeDefinition)) { messageCollection.Add(message); } codeDuplicatedLocator.CheckedMethods.Add(currentMethod.Name); } if (messageCollection.Count == 0) { return(null); } return(messageCollection); }
public AvoidCodeDuplicatedInSiblingClassesRule() { codeDuplicatedLocator = new CodeDuplicatedLocator (this); siblingClasses = new List<TypeDefinition> (); }
public AvoidCodeDuplicatedInSameClassRule() { locator = new CodeDuplicatedLocator (this); }
public AvoidCodeDuplicatedInSameClassRule() { locator = new CodeDuplicatedLocator(this); }
public AvoidCodeDuplicatedInSiblingClassesRule() { codeDuplicatedLocator = new CodeDuplicatedLocator(this); siblingClasses = new List <TypeDefinition> (); }
public AvoidCodeDuplicatedInSiblingClassesRule () { codeDuplicatedLocator = new CodeDuplicatedLocator (this); }