private static IsFormatSupported ( SampleDirection sampleDirection, System.Net.Http.Formatting.MediaTypeFormatter formatter, |
||
sampleDirection | SampleDirection | |
formatter | System.Net.Http.Formatting.MediaTypeFormatter | |
type | ||
return | bool |
private static bool IsFormatSupported(SampleDirection sampleDirection, MediaTypeFormatter formatter, Type type)
{
switch (sampleDirection)
{
case SampleDirection.Request:
return formatter.CanReadType(type);
case SampleDirection.Response:
return formatter.CanWriteType(type);
}
return false;
}