Mhotivo.ParentSite.Areas.HelpPage.HelpPageSampleGenerator.IsFormatSupported C# (CSharp) Метод

IsFormatSupported() приватный статический Метод

private static IsFormatSupported ( SampleDirection sampleDirection, System.Net.Http.Formatting.MediaTypeFormatter formatter, Type type ) : bool
sampleDirection SampleDirection
formatter System.Net.Http.Formatting.MediaTypeFormatter
type System.Type
Результат 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;
        }