Initializes a new instance of the MediaPermission class by specifying a permission state.
An enumerated value of PermissionState.
If state is set to Unrestricted, all media types are granted full permission to play or display with no restrictions. If state is set to None, all media types are restricted from playing or displaying.
The following code example shows how to create a MediaPermission with a PermissionState value.
// Provide full access to the resource protected by the permission.
MediaPermission mediaPermission = new MediaPermission(PermissionState.Unrestricted);
MediaPermission OverloadMediaPermission ClassSystem.Security.Permissions Namespace