Name
FileDialogPermissionAttribute
Synopsis
public sealed class FileDialogPermissionAttribute : CodeAccessSecurityAttribute {
// Public Constructors
public FileDialogPermissionAttribute(SecurityAction action);
// Public Instance Properties
public bool Open{set; get; }
public bool Save{set; get; }
// Public Instance Methods
public override IPermission CreatePermission( );
// overrides SecurityAttribute
}This permission attribute provides declarative syntax support for
FileDialogPermission. The Open
and Save properties take Boolean values that
identify the type of access granted to the file dialog UI components.
Setting Open to true represents permission to
execute the System.Windows.Forms.OpenFileDialog.OpenFile(
) method, and setting Save to true
represents permission to execute the
System.Windows.Forms.SaveFileDialog.OpenFile( )
method. Setting Unrestricted to true represents
the ability to call both methods.
Hierarchy
System.Object
→
System.Attribute
→
SecurityAttribute
→
CodeAccessSecurityAttribute
→
FileDialogPermissionAttribute
Valid On
Assembly, Class, Struct, Constructor, Method
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access