Created
April 30, 2013 16:28
-
-
Save DevJohnC/5489875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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