Beispiel #1
0
        static Exception CheckArguments(string type, string subtype,
                                        IEnumerable <KeyValuePair <string, string> > parameters)
        {
            if (string.IsNullOrEmpty(type))
            {
                throw Failure.NullOrEmptyString(nameof(type));
            }
            if (!VALID_TYPES.Contains(type))
            {
                return(RuntimeFailure.ContentTypeNotStandard("type", type));
            }

            if (string.IsNullOrEmpty(subtype))
            {
                throw Failure.NullOrEmptyString(nameof(subtype));
            }

            return(null);
        }