Esempio n. 1
0
		public void CtorKeyContainer_PermitOnly_UnmanagedCode () 
		{
			StrongNameKeyPairTest snkpt = new StrongNameKeyPairTest ();
			snkpt.ConstructorNullString ();
		}
Esempio n. 2
0
		public void CtorByteArray_PermitOnly_UnmanagedCode ()
		{
			StrongNameKeyPairTest snkpt = new StrongNameKeyPairTest ();
			snkpt.ConstructorByteArray ();
			snkpt.ConstructorECMAByteArray ();
		}
Esempio n. 3
0
		public void CtorFileStream_PermitOnly_UnmanagedCodeFileIOPermission ()
		{
			StrongNameKeyPairTest snkpt = new StrongNameKeyPairTest ();
			FileStream fs = null;
			try {
				snkpt.SetUp ();
				string filename = snkpt.CreateSnkFile ();
				fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
				// we needed too much permissions before calling the 
				// interesting part, so the test is splitted in two
				CtorFileStream (fs);
			}
			finally {
				if (fs != null)
					fs.Close ();
				snkpt.TearDown ();
			}
		}