Пример #1
0
 internal static TypeForwardedToAttribute[] GetCustomAttribute(RuntimeAssembly assembly)
 {
     Type[] o = (Type[])null;
     RuntimeAssembly.GetForwardedTypes(assembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <Type[]>(ref o));
     TypeForwardedToAttribute[] forwardedToAttributeArray = new TypeForwardedToAttribute[o.Length];
     for (int index = 0; index < o.Length; ++index)
     {
         forwardedToAttributeArray[index] = new TypeForwardedToAttribute(o[index]);
     }
     return(forwardedToAttributeArray);
 }
Пример #2
0
 internal static TypeForwardedToAttribute[] GetCustomAttribute(RuntimeAssembly assembly)
 {
     Type[] o = null;
     RuntimeAssembly.GetForwardedTypes(assembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack <Type[]>(ref o));
     TypeForwardedToAttribute[] attributeArray = new TypeForwardedToAttribute[o.Length];
     for (int i = 0; i < o.Length; i++)
     {
         attributeArray[i] = new TypeForwardedToAttribute(o[i]);
     }
     return(attributeArray);
 }
Пример #3
0
        private PermissionRequestEvidence GeneratePermissionRequestEvidence()
        {
            Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled);

            PermissionSet minimumPermissions  = null;
            PermissionSet optionalPermissions = null;
            PermissionSet refusedPermissions  = null;

            GetAssemblyPermissionRequests(m_targetAssembly.GetNativeHandle(),
                                          JitHelpers.GetObjectHandleOnStack(ref minimumPermissions),
                                          JitHelpers.GetObjectHandleOnStack(ref optionalPermissions),
                                          JitHelpers.GetObjectHandleOnStack(ref refusedPermissions));

            if (minimumPermissions != null || optionalPermissions != null || refusedPermissions != null)
            {
                return(new PermissionRequestEvidence(minimumPermissions,
                                                     optionalPermissions,
                                                     refusedPermissions));
            }

            return(null);
        }
        internal static TypeForwardedToAttribute[] GetCustomAttribute(RuntimeAssembly assembly)
        {
            Type[] types = null;
            RuntimeAssembly.GetForwardedTypes(assembly.GetNativeHandle(), JitHelpers.GetObjectHandleOnStack(ref types));

            TypeForwardedToAttribute[] attributes = new TypeForwardedToAttribute[types.Length];
            for (int i = 0; i < types.Length; ++i)
            {
                attributes[i] = new TypeForwardedToAttribute(types[i]);
            }

            return(attributes);
        }
Пример #5
0
        private static Module DefineDynamicModule(RuntimeAssembly containingAssembly,
                                                  bool emitSymbolInfo,
                                                  String name,
                                                  String filename,
                                                  ref StackCrawlMark stackMark,
                                                  ref IntPtr pInternalSymWriter,
                                                  bool fIsTransient,
                                                  out int tkFile)
        {
            RuntimeModule retModule = null;

            DefineDynamicModule(containingAssembly.GetNativeHandle(),
                                emitSymbolInfo,
                                name,
                                filename,
                                JitHelpers.GetStackCrawlMarkHandle(ref stackMark),
                                ref pInternalSymWriter,
                                JitHelpers.GetObjectHandleOnStack(ref retModule),
                                fIsTransient,
                                out tkFile);

            return(retModule);
        }