예제 #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);
            }
        }