public static int Main(string[] args) { int status = 0; try { Console.Out.Write("testing preloading assemblies... "); Console.Out.Flush(); User.UserInfo info = new User.UserInfo(); Ice.InitializationData id = new Ice.InitializationData(); id.properties = Ice.Util.createProperties(); id.properties.setProperty("Ice.PreloadAssemblies", "0"); Ice.Communicator ic = Ice.Util.initialize(id); test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault( (e) => e.CodeBase.EndsWith("msbuild/client/Core.DLL")) == null); ic.destroy(); id.properties.setProperty("Ice.PreloadAssemblies", "1"); ic = Ice.Util.initialize(id); test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((e) => e.CodeBase.EndsWith("msbuild/client/Core.DLL")) != null); Console.Out.WriteLine("ok"); } catch (Exception ex) { Console.Error.WriteLine(ex); status = 1; } return(status); }
public override void Run(string[] args) { Console.Out.Write("testing preloading assemblies... "); Console.Out.Flush(); var info = new User.UserInfo(); Dictionary <string, string> properties = CreateTestProperties(ref args); properties["Ice.PreloadAssemblies"] = "0"; string assembly = $"{Path.GetFileName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase))}/core.dll"; using (Communicator communicator = Initialize(properties)) { Assert(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault( e => e.CodeBase !.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)) == null); } properties["Ice.PreloadAssemblies"] = "1"; using (Communicator communicator = Initialize(properties)) { Assert(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault( e => e.CodeBase !.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)) != null); } Console.Out.WriteLine("ok"); }
public override void run(string[] args) { Console.Out.Write("testing preloading assemblies... "); Console.Out.Flush(); User.UserInfo info = new User.UserInfo(); Ice.Properties properties = createTestProperties(ref args); properties.setProperty("Ice.PreloadAssemblies", "0"); string assembly = String.Format("{0}/core.dll", Path.GetFileName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase))); using (var communicator = initialize(properties)) { test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((e) => { return(e.CodeBase.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)); }) == null); } properties.setProperty("Ice.PreloadAssemblies", "1"); using (var communicator = initialize(properties)) { test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((e) => { return(e.CodeBase.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)); }) != null); } Console.Out.WriteLine("ok"); }
public static int Main(string[] args) { int status = 0; try { Console.Out.Write("testing preloading assemblies... "); Console.Out.Flush(); User.UserInfo info = new User.UserInfo(); Ice.InitializationData id = new Ice.InitializationData(); id.properties = Ice.Util.createProperties(); id.properties.setProperty("Ice.PreloadAssemblies", "0"); string assembly = String.Format("{0}/core.dll", Path.GetFileName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase))); Ice.Communicator ic = Ice.Util.initialize(id); test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((e) => { return(e.CodeBase.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)); }) == null); ic.destroy(); id.properties.setProperty("Ice.PreloadAssemblies", "1"); ic = Ice.Util.initialize(id); test(AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((e) => { return(e.CodeBase.EndsWith(assembly, StringComparison.InvariantCultureIgnoreCase)); }) != null); Console.Out.WriteLine("ok"); } catch (Exception ex) { Console.Error.WriteLine(ex); status = 1; } return(status); }