예제 #1
0
		public void FixtureSetUp()
		{
			// use "IncludeInternalMembers" so that Cecil results match C# parser results
			IkvmLoader loader = new IkvmLoader() { IncludeInternalMembers = true };
			IUnresolvedAssembly asm = loader.LoadAssemblyFile(typeof(TestCase.SimplePublicClass).Assembly.Location);
			compilation = new SimpleCompilation(asm, IkvmLoaderTests.Mscorlib);
		}
예제 #2
0
		public CSharpAmbienceTests()
		{
			ambience = new CSharpAmbience();
			mscorlib = CecilLoaderTests.Mscorlib;
			var loader = new IkvmLoader();
			loader.IncludeInternalMembers = true;
			myLib = loader.LoadAssemblyFile(typeof(CSharpAmbienceTests).Assembly.Location);
			compilation = new SimpleCompilation(myLib, mscorlib);
		}
		public void FixtureSetUp()
		{
			IkvmLoader loader = new IkvmLoader() { IncludeInternalMembers = true };
			IUnresolvedAssembly pc = loader.LoadAssemblyFile(typeof(TestCase.SimplePublicClass).Assembly.Location);
			FastSerializer serializer = new FastSerializer();
			using (MemoryStream ms = new MemoryStream()) {
				serializer.Serialize(ms, pc);
				ms.Position = 0;
				var asm = (IUnresolvedAssembly)serializer.Deserialize(ms);
				base.compilation = new SimpleCompilation(asm, IkvmLoaderTests.Mscorlib);
			}
		}
예제 #4
0
		public static IAssemblyReference LoadAssembly(string path) {
			var l = new IkvmLoader { IncludeInternalMembers = true };
			return l.LoadAssemblyFile(path);
		}