public UseNullable ( string shapeName, string propertyName ) : bool | ||
shapeName | string | The name of the shape the property is in |
propertyName | string | The name of the property |
Результат | bool |
public bool UseNullable(string shapeName, string propertyName)
{
var data = _documentRoot[UseNullableTypeKey];
if (data == null)
return false;
var shape = data[shapeName] as JsonData;
if (shape == null || !shape.IsArray)
return false;
foreach (var name in shape)
{
if (string.Equals(name.ToString(), propertyName))
return true;
}
return false;
}