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])); }
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)])); }