예제 #1
0
 public static bool IsRequired(this JsonProperty jsonProperty)
 {
     if (!jsonProperty.HasAttribute <RequiredAttribute>())
     {
         return(jsonProperty.get_Required() == 2);
     }
     return(true);
 }
        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);
        }
 internal static bool IsObsolete(this JsonProperty jsonProperty)
 {
     return(jsonProperty.HasAttribute <ObsoleteAttribute>());
 }
 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>());
 }