public override int GetHashCode() { unchecked { return(((CodeBag?.GetHashCode() ?? 0) * 397) ^ (Name?.GetHashCode() ?? 0)); } }
public static Instance Build(CodeBag codeBag, string name, string location, int linesOfCode) { return(new Instance(codeBag, name, new Location(location)) { LinesOfCode = linesOfCode }); }
public static Instance Build(CodeBag codeBag, string name, string location, int linesOfCode, int complexity, int depthOfInheritance, int coupling, IEnumerable <Member> members) { return(new Instance(codeBag, name, new Location(location)) { LinesOfCode = linesOfCode, CyclomaticComplexity = complexity, DepthOfInheritance = depthOfInheritance, ClassCoupling = coupling, NumberOfMethods = members.Count(), Members = members.ToList() }); }
public static Instance Build(CodeBag codeBag, string name, Location location, IEnumerable <Member> members) { var type = new Instance(codeBag, name, location) { NumberOfMethods = members.Count(), Members = members.ToList() }; type.Members.ForEach(x => { type.LinesOfCode += x.LinesOfCode; type.CyclomaticComplexity += x.CylomaticComplexity; }); return(type); }
public Instance(CodeBag codeBag, string name, Location path) : base(path) { CodeBag = codeBag; Name = name; }
public Instance(CodeBag codeBag, string name, Location path) { CodeBag = codeBag; Name = name; PhysicalPath = path; }