[Mono-dev] Fwd: Monorail, Mono, Content-type and the registry.....
monoman at gmail.com
Wed Mar 17 10:48:46 EDT 2010
Cross-posting from Castle-project:
How does one determine the mime-type of a resource (normally a file)
in a portable way?
I know Mono on Debian does have a dependency on the shared-mime-info
package, so it probably wraps/uses it, but is it exposed in some
public API? Specially some API that is available in .NET?
Forgive my ignorance on the subject,
Rafael "Monoman" Teixeira
"To be creative means to be in love with life. You can be creative
only if you love life enough that you want to enhance its beauty, you
want to bring a little more music to it, a little more poetry to it, a
little more dance to it."
On Wed, Mar 17, 2010 at 11:41 AM, Rafael Teixeira <monoman at gmail.com> wrote:
> Pending further investigation on available core APIs I would suggest
> that it should be abstracted into a Service (Facility?), that would
> use the registry in Windows, and access the shared-mime-info database
> available in Linux. I'll cross-post to Mono to get better answers on
> details to that.
> ASP.NET MVC may implement it's own mapping, or use some core
> (System/Corlib) functionality that may already be implemented also in
> Mono, investigating it is surely a good thing to do.
> Just guessing but ASP.NET MVC may just skip the issue completely like
> it happens with traditional ASP.NET where a developer needs to either
> let IIS deal with it (by redirecting to a 'navigable' resource) or
> explicitly setting a hand-computed header.
> Just my guesses,
> Rafael "Monoman" Teixeira
> "To be creative means to be in love with life. You can be creative
> only if you love life enough that you want to enhance its beauty, you
> want to bring a little more music to it, a little more poetry to it, a
> little more dance to it."
> On Wed, Mar 17, 2010 at 10:58 AM, James Curran <james.curran at gmail.com> wrote:
>> I've been working on implementing Portable Areas in Monorail. It's
>> about 95% done. One item I have left is setting the content type of a
>> file being read from a resource. Since I have it's extension, reading
>> that from the registry seem simple enough:
>> var contentType =
>> Type") as string;
>> But, as Monorail is expected to compile under Mono, I assume that
>> means the Microsoft.* namespace is off-limits. What is the portable
>> way of doing this?
>> You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
>> To post to this group, send email to castle-project-devel at googlegroups.com.
>> To unsubscribe from this group, send email to castle-project-devel+unsubscribe at googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.
More information about the Mono-devel-list