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
Get Programming .NET Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.