MediaPermission Class

Definition

The MediaPermission describes a set of security permissions that controls the ability for audio, image, and video media to work in a partial-trust Windows Presentation Foundation (WPF) application.

public sealed class MediaPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
Inheritance
Implements

Remarks

This permission uses the values of the MediaPermissionAudio, MediaPermissionImage, and MediaPermissionVideo enumerations.

Constructors

MediaPermission()

Initializes a new instance of the MediaPermission class.

MediaPermission(MediaPermissionAudio)

Initializes a new instance of the MediaPermission class by specifying the audio permission level.

MediaPermission(MediaPermissionAudio, MediaPermissionVideo, MediaPermissionImage)

Initializes a new instance of the MediaPermission class by specifying the audio, video, and image permission levels.

MediaPermission(MediaPermissionImage)

Initializes a new instance of the MediaPermission class by specifying the image permission level.

MediaPermission(MediaPermissionVideo)

Initializes a new instance of the MediaPermission class by specifying the video permission level.

MediaPermission(PermissionState)

Initializes a new instance of the MediaPermission class by specifying a permission state.

Properties

Audio

Gets the current value of the audio permission level.

Image

Gets the current value of the image permission level.

Video

Gets the current value of the video permission level.

Methods

Assert() Inherited from CodeAccessPermission
Copy()

Creates and returns an identical copy of the current permission.

Demand() Inherited from CodeAccessPermission
Deny() Inherited from CodeAccessPermission
Equals(Object) Inherited from CodeAccessPermission
Equals(Object, Object) Inherited from Object
FromXml(SecurityElement)

Reconstructs a permission with a specified state from an XML encoding.

GetHashCode() Inherited from CodeAccessPermission
GetType() Inherited from Object
IPermission.Demand() Inherited from CodeAccessPermission
IStackWalk.Assert() Inherited from CodeAccessPermission
IStackWalk.Demand() Inherited from CodeAccessPermission
IStackWalk.Deny() Inherited from CodeAccessPermission
IStackWalk.PermitOnly() Inherited from CodeAccessPermission
Intersect(IPermission)

Creates and returns a permission that is the intersection of the current permission and the specified permission.

IsSubsetOf(IPermission)

Determines whether the current permission is a subset of the specified permission.

IsUnrestricted()

Returns a value indicating whether the current permission is unrestricted.

MemberwiseClone() Inherited from Object
PermitOnly() Inherited from CodeAccessPermission
ReferenceEquals(Object, Object) Inherited from Object
RevertAll() Inherited from CodeAccessPermission
RevertAssert() Inherited from CodeAccessPermission
RevertDeny() Inherited from CodeAccessPermission
RevertPermitOnly() Inherited from CodeAccessPermission
ToString() Inherited from CodeAccessPermission
ToXml()

Creates an XML encoding of the permission and its current state.

Union(IPermission)

Creates a permission that is the union of the current permission and the specified permission.

Applies to