var contentType =
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(extension).GetValue("Content
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?
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."
Osho
> --
> 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-pro...@googlegroups.com.
> To unsubscribe from this group, send email to castle-project-d...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.
>
Cheers,
Mauricio
On Mar 17, 11:54 am, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> Here's something I've been using:http://github.com/mausch/MobileRemoteBrowser/blob/master/MobileRemote...
Sorry can't get the time to search Mono's sources to be certain, asked
on mono-dev-list to see if someone with more familiarity with the
subject can enlighten us.
Regards,
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."
Osho
On 17/03/2010 15:48, Rafael Teixeira wrote:
> 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?
I had the same problem and I didn't find any portable way to determine
the MIME type of a file. In the end we resolved to just hardcode the
most common file types (by extension, sigh) into our code:
--
Federico Di Gregorio f...@initd.org
Questa lista non pretende di essere il riferimento torinese per il
software libero o altre cazzate del genere. -- Silvano, su torte
_______________________________________________
Mono-devel-list mailing list
Mono-de...@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list