/// <summary>
        /// Called by Silverlight host when it instantiates our application
        /// </summary>
        public DynamicApplication()
        {
            if (_Current != null)
            {
                throw new Exception("Only one instance of DynamicApplication can be created");
            }

            _Current     = this;
            _UIThreadId  = Thread.CurrentThread.ManagedThreadId;
            _HtmlPageUri = HtmlPageUri;

            Settings.ReportUnhandledErrors = true;

            AppManifest     = new DynamicAppManifest();
            LanguagesConfig = DynamicLanguageConfig.Create(AppManifest.Assemblies);

            Startup += new StartupEventHandler(DynamicApplication_Startup);
        }
示例#2
0
 /// <summary>
 /// Create a new language config
 /// </summary>
 private static DynamicLanguageConfig CreateLangConfig()
 {
     return(DynamicLanguageConfig.Create(new DynamicAppManifest().Assemblies));
 }