RatedContentRestrictions.GetRestrictionLevelAsync Method

Retrieves the policy that applies to a piece of content. Apps can use this information to message to the user whether a piece of content can be consumed.

Syntax

public:
IAsyncOperation<ContentAccessRestrictionLevel>^ GetRestrictionLevelAsync(
         RatedContentDescription^ ratedContentDescription
)  

Parameters

ratedContentDescription
Type: RatedContentDescription 

Information about the content for which restriction level is being queried.

Return value

Type: IAsyncOperation<ContentAccessRestrictionLevel

Returns an IAsyncOperation<TResult> object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncOperation<TResult>.Completed property. When the asynchronous operation is complete, the result of the operation can be retrieved by using the IAsyncOperation<TResult>.GetResults method.
The result is an enumeration value indicating the restriction level. See Remarks.

Remarks

The method returns the following values:

Requirements

Namespace: Windows.Media.ContentRestrictions

Metadata: windows.winmd

See also

Reference

RatedContentRestrictions Class

RatedContentRestrictions Members

Windows.Media.ContentRestrictions Namespace