<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.1.20120.5" />

WebPermissionAttribute

Specifies permission to access Internet resources. This class cannot be inherited.
public string Accept { get; set; }

Gets or sets the URI string accepted by the current WebPermissionAttribute.

public string AcceptPattern { get; set; }

Gets or sets a regular expression pattern that describes the URI accepted by the current WebPermissionAttribute.

public string Connect { get; set; }

Gets or sets the URI connection string controlled by the current WebPermissionAttribute.

public string ConnectPattern { get; set; }

Gets or sets a regular expression pattern that describes the URI connection controlled by the current WebPermissionAttribute.

Initializes a new instance of the WebPermissionAttribute class with a value that specifies the security actions that can be performed on this class.