Exemplo n.º 1
0
        public void CtorByteArray_PermitOnly_UnmanagedCode()
        {
            StrongNameKeyPairTest snkpt = new StrongNameKeyPairTest();

            snkpt.ConstructorByteArray();
            snkpt.ConstructorECMAByteArray();
        }
Exemplo n.º 2
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();
            }
        }
Exemplo n.º 3
0
 public void PublicKey_Deny_Unrestricted()
 {
     PublicKey(new StrongNameKeyPair(StrongNameKeyPairTest.GetKey()));
 }
Exemplo n.º 4
0
        public void CtorKeyContainer_PermitOnly_UnmanagedCode()
        {
            StrongNameKeyPairTest snkpt = new StrongNameKeyPairTest();

            snkpt.ConstructorNullString();
        }