private PermissionRequestEvidence GeneratePermissionRequestEvidence()
        {
            PermissionSet permissionSet  = null;
            PermissionSet permissionSet2 = null;
            PermissionSet permissionSet3 = null;

            AssemblyEvidenceFactory.GetAssemblyPermissionRequests(this.m_targetAssembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref permissionSet), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref permissionSet2), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref permissionSet3));
            if (permissionSet != null || permissionSet2 != null || permissionSet3 != null)
            {
                return(new PermissionRequestEvidence(permissionSet, permissionSet2, permissionSet3));
            }
            return(null);
        }
Ejemplo n.º 2
0
        private PermissionRequestEvidence GeneratePermissionRequestEvidence()
        {
            PermissionSet o1 = (PermissionSet)null;
            PermissionSet o2 = (PermissionSet)null;
            PermissionSet o3 = (PermissionSet)null;

            AssemblyEvidenceFactory.GetAssemblyPermissionRequests(this.m_targetAssembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref o1), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref o2), JitHelpers.GetObjectHandleOnStack <PermissionSet>(ref o3));
            if (o1 != null || o2 != null || o3 != null)
            {
                return(new PermissionRequestEvidence(o1, o2, o3));
            }
            return((PermissionRequestEvidence)null);
        }
        private StrongName GenerateStrongNameEvidence()
        {
            byte[] array    = null;
            string name     = null;
            ushort major    = 0;
            ushort minor    = 0;
            ushort build    = 0;
            ushort revision = 0;

            AssemblyEvidenceFactory.GetStrongNameInformation(this.m_targetAssembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <byte[]>(ref array), JitHelpers.GetStringHandleOnStack(ref name), out major, out minor, out build, out revision);
            if (array == null || array.Length == 0)
            {
                return(null);
            }
            return(new StrongName(new StrongNamePublicKeyBlob(array), name, new Version((int)major, (int)minor, (int)build, (int)revision), this.m_targetAssembly));
        }
Ejemplo n.º 4
0
        private StrongName GenerateStrongNameEvidence()
        {
            byte[] o            = (byte[])null;
            string s            = (string)null;
            ushort majorVersion = 0;
            ushort minorVersion = 0;
            ushort build        = 0;
            ushort revision     = 0;

            AssemblyEvidenceFactory.GetStrongNameInformation(this.m_targetAssembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <byte[]>(ref o), JitHelpers.GetStringHandleOnStack(ref s), out majorVersion, out minorVersion, out build, out revision);
            if (o == null || o.Length == 0)
            {
                return((StrongName)null);
            }
            return(new StrongName(new StrongNamePublicKeyBlob(o), s, new Version((int)majorVersion, (int)minorVersion, (int)build, (int)revision), (Assembly)this.m_targetAssembly));
        }