Catel.ApiCop.Rules.TooManyDependenciesApiCopRule.IsValid C# (CSharp) 메소드

IsValid() 공개 메소드

Determines whether the specified ApiCop rule is valid.
public IsValid ( IApiCop apiCop, string tag ) : bool
apiCop IApiCop The ApiCop.
tag string The tag.
리턴 bool
        public override bool IsValid(IApiCop apiCop, string tag)
        {
            int maxDependencies = 0;
            if (_dependenciesPerType.ContainsKey(tag))
            {
                maxDependencies = _dependenciesPerType[tag];
            }

            return maxDependencies <= MaxDependencies;
        }