ServiceStack.ContentFormat.IsBinary C# (CSharp) Метод

IsBinary() публичный статический Метод

public static IsBinary ( this contentType ) : bool
contentType this
Результат bool
        public static bool IsBinary(this string contentType)
        {
            var realContentType = GetRealContentType(contentType);
            switch (realContentType)
            {
                case MimeTypes.ProtoBuf:
                case MimeTypes.MsgPack:
                case MimeTypes.Binary:
                case MimeTypes.Bson:
                case MimeTypes.Wire:
                    return true;
            }

            var primaryType = realContentType.LeftPart('/');
            switch (primaryType)
            {
                case "image":
                case "audio":
                case "video":
                    return true;
            }

            return false;
        }