Exemplo n.º 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);
 }
Exemplo n.º 2
0
        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):");
        }
Exemplo n.º 3
0
 public static string ToString(this MetadataReader reader, DeclarativeSecurityAttributeHandle x) => reader.ToString(reader.GetDeclarativeSecurityAttribute(x));
Exemplo n.º 4
0
 public static DeclarativeSecurityAttribute GetDeclarativeSecurityAttribute(this DeclarativeSecurityAttributeHandle handle, MetadataReader reader) => reader.GetDeclarativeSecurityAttribute(handle);