예제 #1
0
 public TypeMetric(
     bool isAbstract,
     TypeMetricKind kind,
     AccessModifierKind accessModifier,
     IEnumerable <IMemberMetric> memberMetrics,
     int linesOfCode,
     int sourceLinesOfCode,
     int cyclomaticComplexity,
     double maintainabilityIndex,
     int depthOfInheritance,
     IEnumerable <ITypeCoupling> classCouplings,
     string name,
     int afferentCoupling,
     int efferentCoupling,
     double instability,
     ITypeDocumentation documentation)
 {
     IsAbstract           = isAbstract;
     Kind                 = kind;
     AccessModifier       = accessModifier;
     MemberMetrics        = memberMetrics.AsArray();
     LinesOfCode          = linesOfCode;
     SourceLinesOfCode    = sourceLinesOfCode;
     CyclomaticComplexity = cyclomaticComplexity;
     MaintainabilityIndex = maintainabilityIndex;
     DepthOfInheritance   = depthOfInheritance;
     Dependencies         = classCouplings.AsArray();
     Name                 = name;
     AfferentCoupling     = afferentCoupling;
     EfferentCoupling     = efferentCoupling;
     Instability          = instability;
     Documentation        = documentation;
 }
예제 #2
0
 public MemberMetric(
     string codeFile,
     AccessModifierKind accessModifier,
     IHalsteadMetrics halstead,
     int lineNumber,
     int linesOfCode,
     double maintainabilityIndex,
     int cyclomaticComplexity,
     string name,
     IEnumerable <ITypeCoupling> classCouplings,
     int numberOfParameters,
     int numberOfLocalVariables,
     int afferentCoupling,
     IMemberDocumentation documentation)
 {
     _halstead            = halstead;
     CodeFile             = codeFile;
     AccessModifier       = accessModifier;
     LineNumber           = lineNumber;
     LinesOfCode          = linesOfCode;
     MaintainabilityIndex = maintainabilityIndex;
     CyclomaticComplexity = cyclomaticComplexity;
     Name                   = name;
     ClassCouplings         = classCouplings;
     NumberOfParameters     = numberOfParameters;
     NumberOfLocalVariables = numberOfLocalVariables;
     AfferentCoupling       = afferentCoupling;
     Documentation          = documentation;
 }
예제 #3
0
		public TypeMetric(
			bool isAbstract,
			TypeMetricKind kind,
			AccessModifierKind accessModifier,
			IEnumerable<IMemberMetric> memberMetrics,
			int linesOfCode,
			int cyclomaticComplexity,
			double maintainabilityIndex,
			int depthOfInheritance,
			IEnumerable<ITypeCoupling> classCouplings,
			string name,
			int afferentCoupling,
			int efferentCoupling,
			double instability,
			ITypeDocumentation documentation)
		{
			IsAbstract = isAbstract;
			Kind = kind;
			AccessModifier = accessModifier;
			MemberMetrics = memberMetrics;
			LinesOfCode = linesOfCode;
			CyclomaticComplexity = cyclomaticComplexity;
			MaintainabilityIndex = maintainabilityIndex;
			DepthOfInheritance = depthOfInheritance;
			ClassCouplings = classCouplings.AsArray();
			Name = name;
			AfferentCoupling = afferentCoupling;
			EfferentCoupling = efferentCoupling;
			Instability = instability;
			Documentation = documentation;
		}
예제 #4
0
		public MemberMetric(
			string codeFile,
			AccessModifierKind accessModifier,
			IHalsteadMetrics halstead,
			int lineNumber,
			int linesOfCode,
			double maintainabilityIndex,
			int cyclomaticComplexity,
			string name,
			IEnumerable<ITypeCoupling> classCouplings,
			int numberOfParameters,
			int numberOfLocalVariables,
			int afferentCoupling,
			IMemberDocumentation documentation)
		{
			_halstead = halstead;
			CodeFile = codeFile;
			AccessModifier = accessModifier;
			LineNumber = lineNumber;
			LinesOfCode = linesOfCode;
			MaintainabilityIndex = maintainabilityIndex;
			CyclomaticComplexity = cyclomaticComplexity;
			Name = name;
			ClassCouplings = classCouplings.AsArray();
			NumberOfParameters = numberOfParameters;
			NumberOfLocalVariables = numberOfLocalVariables;
			AfferentCoupling = afferentCoupling;
			Documentation = documentation;
		}
예제 #5
0
 public AccessModifier(SyntaxToken token, AccessModifierKind kind)
 {
     Token = token;
     Kind  = kind;
 }
예제 #6
0
파일: Errors.cs 프로젝트: DustLanguage/Dust
 public static Error IncombinableModifier(SyntaxToken modiferToken, AccessModifierKind otherKind) => CreateError($"modifier '{AccessModifier.ParseKind(modiferToken.Kind)}' can't be combined with modifier '{otherKind}'", modiferToken);
예제 #7
0
 public Automaton(string name, AccessModifierKind accessModifier = AccessModifierKind.Internal, string dataType = "object")
 {
     AccessModifier = accessModifier;
     Name           = name;
     DataType       = dataType;
 }
예제 #8
0
 public static string ToString(AccessModifierKind kind)
 {
     return(kind.ToString().ToLower());
 }