Example #1
0
 public DeclSecurityEntry(PEFile module, DeclarativeSecurityAttributeHandle handle)
 {
     this.metadataOffset = module.Reader.PEHeaders.MetadataStartOffset;
     this.module         = module;
     this.metadata       = module.Metadata;
     this.handle         = handle;
     this.declSecAttr    = metadata.GetDeclarativeSecurityAttribute(handle);
 }
        private void WriteDeclSecurity()
        {
            AddHeader(
                "Parent",
                "PermissionSet",
                "Action"
                );

            foreach (var handle in reader.DeclarativeSecurityAttributes)
            {
                var entry = reader.GetDeclarativeSecurityAttribute(handle);

                AddRow(
                    Token(entry.Parent),
                    Literal(entry.PermissionSet),
                    EnumValue <short>(entry.Action)
                    );
            }

            WriteRows("DeclSecurity (0x0e):");
        }
Example #3
0
 public static string ToString(this MetadataReader reader, DeclarativeSecurityAttributeHandle x) => reader.ToString(reader.GetDeclarativeSecurityAttribute(x));
Example #4
0
 public static DeclarativeSecurityAttribute GetDeclarativeSecurityAttribute(this DeclarativeSecurityAttributeHandle handle, MetadataReader reader) => reader.GetDeclarativeSecurityAttribute(handle);