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 |
事件處理常式,可在使用者的內容設定變更時通知應用程式。 |