Skip to content

Instantly share code, notes, and snippets.

@DevJohnC
Created April 30, 2013 16:28
Show Gist options
  • Select an option

  • Save DevJohnC/5489875 to your computer and use it in GitHub Desktop.

Select an option

Save DevJohnC/5489875 to your computer and use it in GitHub Desktop.
private AppInfo GetAppInfo(IDomainType appType)
{
try
{
var controller = appType.Controller;
if (controller == null)
return null;
var appInstance = controller.CreateInstance(appType) as IApp;
if (appInstance == null)
return null;
var appInfo = appInstance.Manifest;
appInstance.Dispose();
return new AppInfo
{
Info = appInfo,
Type = appType,
LoadOk = true
};
}
catch(Exception ex)
{
Console.WriteLine("Exception getting appinfo: {0}", ex);
return new AppInfo
{
Info = null,
Type = appType,
LoadOk = false
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment