Determine if a SharePoint 2010 Search Service Application is FAST Search or SharePoint Search

One of the things that may be useful to know when you are writing custom search applications for SharePoint 2010 is whether the search service application you are working with is FAST Search for SharePoint or SharePoint Search.  Fortunately the object model provides a fairly straightforward way to do this once you know where to look.  Assuming you have a reference to a SearchServiceApplication instance, you can check the DefaultSearchProvider property to figure out if it is for FAST Search or SharePoint Search.  The property is just an enumerator so it's pretty easy to use.  Here's a simple example (where serviceApp is an existing instance of a SearchServiceApplication): 

if (serviceApp.DefaultSearchProvider == SearchProvider.FASTSearch)

...do something

The enum for DefaultSearchProvider is FASTSearch, SharepointSearch, and Default. In all honesty I couldn't tell you what Default is, sorry.