RatedContentRestrictions 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
包含与用户的“家庭安全”内容设置相关的所有行为和功能。
public ref class RatedContentRestrictions sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.ContentRestrictions.IRatedContentRestrictionsFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RatedContentRestrictions final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.ContentRestrictions.IRatedContentRestrictionsFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class RatedContentRestrictions final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.ContentRestrictions.IRatedContentRestrictionsFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RatedContentRestrictions
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.ContentRestrictions.IRatedContentRestrictionsFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class RatedContentRestrictions
function RatedContentRestrictions(maxAgeRating)
Public NotInheritable Class RatedContentRestrictions
- 继承
- 属性
Windows 要求
设备系列 |
Windows 10 (在 10.0.10240.0 中引入)
|
API contract |
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
|
构造函数
RatedContentRestrictions() |
初始化 RatedContentRestrictions 类的新实例。 |
RatedContentRestrictions(UInt32) |
使用应用使用的指定年龄分级初始化 RatedContentRestrictions 类的新实例,以限制内容使用。 |
方法
GetBrowsePolicyAsync() |
获取用于筛选应用内容目录的信息。 |
GetRestrictionLevelAsync(RatedContentDescription) |
获取适用于内容片段的策略,用于内容浏览和使用。 |
RequestContentAccessAsync(RatedContentDescription) |
确定是否允许用户使用一段内容。 |
事件
RestrictionsChanged |
一个事件处理程序,用于在用户的内容设置发生更改时通知应用。 |