FileGenerator.Drawables.DrawablesGenerator.IsValid C# (CSharp) Method

IsValid() private method

private IsValid ( ConstructorInfo constructor ) : bool
constructor System.Reflection.ConstructorInfo
return bool
    private bool IsValid(ConstructorInfo constructor)
    {
      var parameters = constructor.GetParameters();
      if (parameters.Length == 0)
        return _ForCore && constructor.DeclaringType.GetConstructors().Count() == 1;

      if (_ForCore)
        return parameters.All(parameter => IsSupportedByCore(parameter.ParameterType.Name));

      return parameters.All(parameter => !IsSupportedByCore(parameter.ParameterType.Name));
    }