Qowaiv.Json.QowaivJsonConverter.CanConvert C# (CSharp) Method

CanConvert() public method

Returns true if the object type is (nullable) IJsonSerializable.
public CanConvert ( Type objectType ) : bool
objectType System.Type /// The object type to convert. ///
return bool
        public override bool CanConvert(Type objectType)
        {
            return objectType != null && (QowaivType.IsIJsonSerializable(objectType) || QowaivType.IsNullableIJsonSerializable(objectType));
        }

Usage Example

Esempio n. 1
0
        public void CanConvert_Null_IsFalse()
        {
            var converter = new QowaivJsonConverter();

            Assert.IsFalse(converter.CanConvert(null));
        }
All Usage Examples Of Qowaiv.Json.QowaivJsonConverter::CanConvert