Imgur.API.JsonConverters.EpochTimeConverter.CanConvert C# (CSharp) Method

CanConvert() public method

Determines whether this instance can convert the specified object type.
public CanConvert ( Type objectType ) : bool
objectType System.Type Type of the object.
return bool
        public override bool CanConvert(Type objectType)
        {
            return objectType == typeof(DateTimeOffset);
        }

Usage Example

        public void CanConvert(Type type, bool canConvert)
        {
            var converter = new EpochTimeConverter();

            Assert.Equal(converter.CanConvert(type), canConvert);
        }