Mono Class Library: System.Net.SocketPermissionAttribute Overview | Members

System.Net.SocketPermissionAttribute.CreatePermission Method

Returns a System.Net.SocketPermission that contains the security information of the current instance. [Edit]

public override System.Security.IPermission CreatePermission ()

Returns

A System.Net.SocketPermission object with the security information of the current instance. [Edit]

Exceptions

TypeReason
ArgumentExceptionOne or more of the current instance's SocketPermissionAttribute.Access, SocketPermissionAttribute.Host, SocketPermissionAttribute.Transport or SocketPermissionAttribute.Port properties is null. [Edit]

Remarks

Note:

This method overrides System.Security.Permissions.SecurityAttribute.CreatePermission.

Applications typically do not call this method; it is intended for use by the system.

The security information described by a security attribute is stored in the metadata of the attribute target, and is accessed by the system at run-time. The system uses the object returned by this method to convert the security information of the current instance into the form stored in metadata.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0