Newtonsoft.Json.Serialization.DefaultContractResolver.GetParametrizedConstructor C# (CSharp) Method

GetParametrizedConstructor() private method

private GetParametrizedConstructor ( Type objectType ) : ConstructorInfo
objectType System.Type
return System.Reflection.ConstructorInfo
    private ConstructorInfo GetParametrizedConstructor(Type objectType)
    {
      ConstructorInfo[] constructors = objectType.GetConstructors(BindingFlags.Public | BindingFlags.Instance);

      if (constructors.Length == 1)
        return constructors[0];
      else
        return null;
    }