示例#1
0
        protected virtual ICollection <ContentType> GetContentTypeByUrl(Uri url)
        {
            string extension = UriExtensions.GetExtension(url);

            if (null == extension)
            {
                return((ICollection <ContentType>)null);
            }
            return((ICollection <ContentType>)Enumerable.ToArray <ContentType>(this.ExtensionLookup[extension]));
        }
示例#2
0
 protected virtual ICollection <ContentType> GetContentTypeByFileName(string filename)
 {
     if (string.IsNullOrWhiteSpace(filename))
     {
         return((ICollection <ContentType>)null);
     }
     return((ICollection <ContentType>)Enumerable.ToArray <ContentType>(this.ExtensionLookup[UriExtensions.GetExtension(filename)]));
 }