Example #1
0
        public static void InitRuntime()
        {
            if (runtimeInitialized)
            {
                return;
            }
            Qyoto.Init_qyoto_qtcore();
            SmokeMarshallers.SetUp();
            QMetaType.RegisterType <object>();
            // not set when mono is embedded
            if (AppDomain.CurrentDomain.SetupInformation.ConfigurationFile == null)
            {
                PropertyInfo   pi    = typeof(AppDomain).GetProperty("SetupInformationNoCopy", BindingFlags.NonPublic | BindingFlags.Instance);
                AppDomainSetup setup = (AppDomainSetup)pi.GetValue(AppDomain.CurrentDomain, null);
                setup.ConfigurationFile = Assembly.GetExecutingAssembly().Location + ".config";
            }

            foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
            {
                TryInitialize(a);
            }

            runtimeInitialized = true;
        }