コード例 #1
0
 public static bool IsRequired(this JsonProperty jsonProperty)
 {
     if (!jsonProperty.HasAttribute <RequiredAttribute>())
     {
         return(jsonProperty.get_Required() == 2);
     }
     return(true);
 }
コード例 #2
0
        internal static bool IsRequired(this JsonProperty jsonProperty)
        {
            if (jsonProperty.Required == Newtonsoft.Json.Required.AllowNull)
            {
                return(true);
            }

            if (jsonProperty.Required == Newtonsoft.Json.Required.Always)
            {
                return(true);
            }

            if (jsonProperty.HasAttribute <RequiredAttribute>())
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
 internal static bool IsObsolete(this JsonProperty jsonProperty)
 {
     return(jsonProperty.HasAttribute <ObsoleteAttribute>());
 }
コード例 #4
0
 public static bool IsRequired(this JsonProperty jsonProperty)
 {
     return(jsonProperty.HasAttribute <RequiredAttribute>() || jsonProperty.Required == Required.Always);
 }
コード例 #5
0
 public static bool IsRequired(this JsonProperty jsonProperty)
 {
     return jsonProperty.HasAttribute<RequiredAttribute>();
 }
コード例 #6
0
 public static bool IsObsolete(this JsonProperty jsonProperty)
 {
     return jsonProperty.HasAttribute<ObsoleteAttribute>();
 }
コード例 #7
0
 internal static bool IsRequired(this JsonProperty jsonProperty)
 {
     return(jsonProperty.Required == Newtonsoft.Json.Required.AllowNull ||
            jsonProperty.Required == Newtonsoft.Json.Required.Always ||
            jsonProperty.HasAttribute <RequiredAttribute>());
 }
コード例 #8
0
 public static bool IsSwaggerExample(this JsonProperty jsonProperty)
 {
     return(jsonProperty.HasAttribute <SwaggerExample>());
 }
コード例 #9
0
 public static bool IsRequiredConditionally(this JsonProperty jsonProperty)
 {
     return(jsonProperty.HasAttribute <RequiredConditionally>());
 }