CanReadType() public method

public CanReadType ( Type type ) : bool
type System.Type
return bool
コード例 #1
0
        public void TextMediaTypeFormatter_ReadsTypesTextAndNotOtherTypes()
        {
            var mediaTypeFormatter = new TextMediaTypeFormatter();

            Assert.True(mediaTypeFormatter.CanReadType(typeof(string)));
            Assert.False(mediaTypeFormatter.CanReadType(typeof(int)));
        }