コード例 #1
0
ファイル: Loader.cs プロジェクト: Hank923/ironruby
 public AssemblyResolveHolder(Loader/*!*/ loader) {
     _loader = new WeakReference(loader);
 }
コード例 #2
0
ファイル: Driver.cs プロジェクト: jcteague/ironruby
        public static void Main(string[]/*!*/ arguments) {
            List<string> args = new List<string>(arguments);
            if (args.Contains("/partial")) {
                Console.WriteLine("Running in partial trust");

                PermissionSet ps = CreatePermissionSetByName();
                AppDomainSetup setup = new AppDomainSetup();
                setup.ApplicationBase = Environment.CurrentDirectory;
                AppDomain domain = AppDomain.CreateDomain("Tests", null, setup, ps);

                Loader loader = new Loader(args);
                domain.DoCallBack(new CrossAppDomainDelegate(loader.Run));
                
                Environment.ExitCode = loader.ExitCode;
            } else {
                Environment.ExitCode = Run(args);
            }
        }
コード例 #3
0
ファイル: Driver.cs プロジェクト: madpilot/ironruby
        public static void Main(string[]/*!*/ arguments) {
            List<string> args = new List<string>(arguments);
            string culture = Environment.GetEnvironmentVariable("IR_CULTURE");

            if (args.Contains("/partial")) {
                Console.WriteLine("Running in partial trust");

                PermissionSet ps = CreatePermissionSet();
                AppDomainSetup setup = new AppDomainSetup();

                setup.ApplicationBase = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                AppDomain domain = AppDomain.CreateDomain("Tests", null, setup, ps);

                Loader loader = new Loader(args);
                domain.DoCallBack(new CrossAppDomainDelegate(loader.Run));
                
                Environment.ExitCode = loader.ExitCode;
            } else {
                if (!String.IsNullOrEmpty(culture)) {
                    Thread.CurrentThread.CurrentCulture = new CultureInfo(culture, false);
                }
                Environment.ExitCode = Run(args);
            }
        }