Class JsonReaderResultExtensions
Extension methods for the JsonReaderResult.
Inheritance
System.Object
JsonReaderResultExtensions
Namespace: Cuemon.Serialization.Json
Assembly: Cuemon.Serialization.Json.dll
Syntax
public static class JsonReaderResultExtensions : object
Methods
| Improve this DocFirstProperty(IEnumerable<JsonReaderResult>, String)
Returns the first JsonReaderResult matching the specified propertyName
, or a default value if no property is found.
Declaration
public static JsonReaderResult FirstProperty(this IEnumerable<JsonReaderResult> source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<JsonReaderResult> | source | The sequence to return the first property value of. |
System.String | propertyName | The property name to find in |
Returns
Type | Description |
---|---|
JsonReaderResult | The first JsonReaderResult of the input sequence, or null if the sequence does not contains the specified |
SingleProperty(IEnumerable<JsonReaderResult>, String)
Returns the only JsonReaderResult matching the specified propertyName
; this method throws an exception if more than one property is found.
Declaration
public static JsonReaderResult SingleProperty(this IEnumerable<JsonReaderResult> source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<JsonReaderResult> | source | The sequence to return the single property value of. |
System.String | propertyName | The property name to find in |
Returns
Type | Description |
---|---|
JsonReaderResult | The single JsonReaderResult of the input sequence, or null if the sequence does not contains the specified |