VerificationAttributeとは? わかりやすく解説

VerificationAttribute クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

Web コンテンツアクセシビリティ規則メタデータ属性定義します。このクラス継承できません。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Property,
 AllowMultiple:=True)> _
Public NotInheritable Class
 VerificationAttribute
    Inherits Attribute
Dim instance As VerificationAttribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Property, AllowMultiple=true)]
 
public sealed class VerificationAttribute :
 Attribute
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Property, AllowMultiple=true)]
 
public ref class VerificationAttribute sealed
 : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Property,
 AllowMultiple=true) */ 
public final class VerificationAttribute extends
 Attribute
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Property, AllowMultiple=true)
 
public final class VerificationAttribute extends
 Attribute
解説解説

VerificationAttribute クラスインスタンスは、検証できる、Web コンテンツアクセシビリティ規則定義します。『Web Content Accessibility Guidelines』の詳細については、W3C (World Wide Web Consortium) Web サイト参照してください

VerificationAttributeインスタンス定義するために必要な最小限情報には、次のような種類あります

インスタンス作成時に指定できる検証規則オプションプロパティ

VerificationAttribute メタデータは、クラスプロパティ、およびインデクサの各宣言で定義できます

属性使用方法については、「属性使用したメタデータ拡張」を参照してください

使用例使用例

VerificationAttribute クラス使用するコード例次に示します検証メタデータ定義で使用するガイドラインは、"WCAG" (Web Content Accessibility Guideline) および "ADA" (Americans with Disabilities Act Guidelines) です。詳細については、W3C (World Wide Web Consortium) Web サイト参照してください

使用するチェックポイントは、WCAG場合は "1.1"、ADA場合は "1194.22(a)" です。これらのチェックポイントは、テキスト以外の要素等価テキスト確実に存在するようにします。VerificationAttribute は、ImageProperty という名前の別のプロパティ等価テキストを表す ImageText プロパティ適用されます。ImageText プロパティ設定されていない場合アクセシビリティ検証によって "The image is missing a text equivalent." のメッセージ返されます。

<Verification("ADA", "1194.22(a)",
 VerificationReportLevel.Error, 1, "The image is missing a text
 equivalent.", VerificationRule.NotEmptyString, "ImageUrl")> _
<Verification("WCAG", "1.1",
 VerificationReportLevel.Error, 1, "The image is missing a text
 equivalent.", VerificationRule.NotEmptyString, "ImageUrl")> _
Public Property ImageText() As
 String
    Get
        If ViewState("ImageText")
 Is Nothing Then
            Return String.Empty
        Else
            Return CType(ViewState("ImageText"),
 String)
        End If
    End Get
    Set(ByVal value As String)
        ViewState("ImageText") = value
    End Set
End Property


Public Property ImageUrl() As
 String
    Get
        If ViewState("ImageUrl")
 Is Nothing Then
            Return String.Empty
        Else
            Return CType(ViewState("ImageUrl"),
 String)
        End If
    End Get
    Set(ByVal value As String)
        ViewState("ImageUrl") = value
    End Set
End Property
[Verification("ADA", "1194.22(a)", 
    VerificationReportLevel.Error, 1,
    "The image is missing a text equivalent.", 
    VerificationRule.NotEmptyString, "ImageUrl"),
Verification("WCAG", "1.1", 
    VerificationReportLevel.Error, 1, 
    "The image is missing an text equivalent.", 
    VerificationRule.NotEmptyString, "ImageUrl")]
public virtual String ImageText
{
    get
    {
        object obj = ViewState["ImageText"];
        return ((obj == null) ? String.Empty
 : (string)obj);
    }
    set
    {
        ViewState["ImageText"] = value;
    }
}
public virtual String ImageUrl
{
    get 
    {
        object obj = ViewState["ImageUrl"];
        return ((obj == null) ? String.Empty
 : (string)obj);
    }
    set 
    { 
        ViewState["ImageUrl"] = value;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Attribute
    System.Web.UI.VerificationAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

VerificationAttribute コンストラクタ (String, String, VerificationReportLevel, Int32, String, VerificationRule, String, VerificationConditionalOperator, String, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

アクセシビリティ ガイドラインチェックポイントレポート レベルチェックポイント優先度エラー メッセージVerificationRule 値、関連する条件付きプロパティ関連する条件付きプロパティ値、およびリファレンス ガイドラインURL使用して、VerificationAttribute クラス新しインスタンス初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    guideline As String, _
    checkpoint As String, _
    reportLevel As VerificationReportLevel, _
    priority As Integer, _
    message As String, _
    rule As VerificationRule, _
    conditionalProperty As String, _
    conditionalOperator As VerificationConditionalOperator, _
    conditionalValue As String, _
    guidelineUrl As String _
)
Dim guideline As String
Dim checkpoint As String
Dim reportLevel As VerificationReportLevel
Dim priority As Integer
Dim message As String
Dim rule As VerificationRule
Dim conditionalProperty As String
Dim conditionalOperator As VerificationConditionalOperator
Dim conditionalValue As String
Dim guidelineUrl As String

Dim instance As New VerificationAttribute(guideline,
 checkpoint, reportLevel, priority, message, rule, conditionalProperty, conditionalOperator,
 conditionalValue, guidelineUrl)
public VerificationAttribute (
    string guideline,
    string checkpoint,
    VerificationReportLevel reportLevel,
    int priority,
    string message,
    VerificationRule rule,
    string conditionalProperty,
    VerificationConditionalOperator conditionalOperator,
    string conditionalValue,
    string guidelineUrl
)
public:
VerificationAttribute (
    String^ guideline, 
    String^ checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String^ message, 
    VerificationRule rule, 
    String^ conditionalProperty, 
    VerificationConditionalOperator conditionalOperator, 
    String^ conditionalValue, 
    String^ guidelineUrl
)
public VerificationAttribute (
    String guideline, 
    String checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String message, 
    VerificationRule rule, 
    String conditionalProperty, 
    VerificationConditionalOperator conditionalOperator, 
    String conditionalValue, 
    String guidelineUrl
)
public function VerificationAttribute (
    guideline : String, 
    checkpoint : String, 
    reportLevel : VerificationReportLevel, 
    priority : int, 
    message : String, 
    rule : VerificationRule, 
    conditionalProperty : String, 
    conditionalOperator : VerificationConditionalOperator, 
    conditionalValue : String, 
    guidelineUrl : String
)

パラメータ

guideline

検証規則記述されアクセシビリティ ガイドライン

checkpoint

ガイドライン内のチェックポイント

reportLevel

VerificationReportLevel 値の 1 つ

priority

チェックポイント優先度

message

検証規則true場合表示されるメッセージ

rule

VerificationRule 値の 1 つ

conditionalProperty

アクセシビリティ規則検証するために使用する条件式左辺

conditionalOperator

VerificationConditionalOperator 値の 1 つ

conditionalValue

アクセシビリティ規則検証するために使用する条件式右辺

guidelineUrl

guideline参照 URL

解説解説

この VerificationAttribute使用すると、使用できるすべてのプロパティ指定して VerificationAttribute クラスインスタンス作成できます

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
VerificationAttribute クラス
VerificationAttribute メンバ
System.Web.UI 名前空間

VerificationAttribute コンストラクタ (String, String, VerificationReportLevel, Int32, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

アクセシビリティ ガイドラインチェックポイントレポート レベルチェックポイント優先度、およびエラー メッセージ使用して、VerificationAttribute クラス新しインスタンス初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    guideline As String, _
    checkpoint As String, _
    reportLevel As VerificationReportLevel, _
    priority As Integer, _
    message As String _
)
Dim guideline As String
Dim checkpoint As String
Dim reportLevel As VerificationReportLevel
Dim priority As Integer
Dim message As String

Dim instance As New VerificationAttribute(guideline,
 checkpoint, reportLevel, priority, message)
public VerificationAttribute (
    string guideline,
    string checkpoint,
    VerificationReportLevel reportLevel,
    int priority,
    string message
)
public:
VerificationAttribute (
    String^ guideline, 
    String^ checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String^ message
)
public VerificationAttribute (
    String guideline, 
    String checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String message
)
public function VerificationAttribute (
    guideline : String, 
    checkpoint : String, 
    reportLevel : VerificationReportLevel, 
    priority : int, 
    message : String
)

パラメータ

guideline

検証規則記述されアクセシビリティ ガイドライン

checkpoint

ガイドライン内のチェックポイント

reportLevel

VerificationReportLevel 値の 1 つ

priority

チェックポイント優先度

message

検証規則true場合表示されるメッセージ

解説解説

VerificationAttribute クラスVerificationAttribute コンストラクタは、検証規則定義するために必要な最小限情報示しますVerificationAttribute インスタンスについて、次の既定値設定されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
VerificationAttribute クラス
VerificationAttribute メンバ
System.Web.UI 名前空間

VerificationAttribute コンストラクタ (String, String, VerificationReportLevel, Int32, String, VerificationRule, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

アクセシビリティ ガイドラインチェックポイントレポート レベルチェックポイント優先度エラー メッセージVerificationRule 値、および関連する条件付きプロパティ使用して、VerificationAttribute クラス新しインスタンス初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    guideline As String, _
    checkpoint As String, _
    reportLevel As VerificationReportLevel, _
    priority As Integer, _
    message As String, _
    rule As VerificationRule, _
    conditionalProperty As String _
)
Dim guideline As String
Dim checkpoint As String
Dim reportLevel As VerificationReportLevel
Dim priority As Integer
Dim message As String
Dim rule As VerificationRule
Dim conditionalProperty As String

Dim instance As New VerificationAttribute(guideline,
 checkpoint, reportLevel, priority, message, rule, conditionalProperty)
public VerificationAttribute (
    string guideline,
    string checkpoint,
    VerificationReportLevel reportLevel,
    int priority,
    string message,
    VerificationRule rule,
    string conditionalProperty
)
public:
VerificationAttribute (
    String^ guideline, 
    String^ checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String^ message, 
    VerificationRule rule, 
    String^ conditionalProperty
)
public VerificationAttribute (
    String guideline, 
    String checkpoint, 
    VerificationReportLevel reportLevel, 
    int priority, 
    String message, 
    VerificationRule rule, 
    String conditionalProperty
)
public function VerificationAttribute (
    guideline : String, 
    checkpoint : String, 
    reportLevel : VerificationReportLevel, 
    priority : int, 
    message : String, 
    rule : VerificationRule, 
    conditionalProperty : String
)

パラメータ

guideline

検証規則記述されアクセシビリティ ガイドライン

checkpoint

ガイドライン内のチェックポイント

reportLevel

VerificationReportLevel 値の 1 つ

priority

チェックポイント優先度

message

検証規則true場合表示されるメッセージ

rule

VerificationRule 値の 1 つ

conditionalProperty

アクセシビリティ規則検証するために使用する条件式左辺

解説解説

conditionalProperty パラメータは、検証規則評価するための条件式一部として使用される別のプロパティです。たとえば、その規則パラメータが NotEmptyString である場合conditionalProperty指定される関連するプロパティは、空の文字列 ("") 以外である必要があります

VerificationAttribute インスタンスについて、次の既定値設定されます。

前述リストにあるプロパティの値を既定値以外に指定するには、VerificationAttribute コンストラクタオーバーロード使用します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
VerificationAttribute クラス
VerificationAttribute メンバ
System.Web.UI 名前空間

VerificationAttribute コンストラクタ

VerificationAttribute クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

参照参照

関連項目

VerificationAttribute クラス
VerificationAttribute メンバ
System.Web.UI 名前空間

VerificationAttribute プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Checkpoint 指定した Guideline プロパティの、アクセシビリティチェックポイント参照取得します
パブリック プロパティ ConditionalProperty アクセシビリティチェックポイント検証一部として使用する条件式左辺取得します
パブリック プロパティ ConditionalValue アクセシビリティチェックポイント検証一部として使用する条件式右辺取得します
パブリック プロパティ Guideline アクセシビリティチェック使用するガイドライン取得します
パブリック プロパティ GuidelineUrl Guideline プロパティ指定されるアクセシビリティガイドラインについての詳細情報取得するために使用できる URL取得します
パブリック プロパティ Message アクセシビリティチェックポイント検証規則true場合に、メッセージ文字列取得します
パブリック プロパティ Priority アクセシビリティチェックポイント優先度取得します
パブリック プロパティ TypeId  派生クラス実装されている場合は、この Attribute一意識別子取得します。 ( Attribute から継承されます。)
パブリック プロパティ VerificationConditionalOperator アクセシビリティチェックポイント検証方法を示す VerificationConditionalOperator 列挙値を取得します
パブリック プロパティ VerificationReportLevel アクセシビリティチェックポイント使用方法を示す VerificationReportLevel 列挙値を取得します
パブリック プロパティ VerificationRule アクセシビリティチェックポイント使用方法を示す VerificationRule 列挙値を取得します
参照参照

関連項目

VerificationAttribute クラス
System.Web.UI 名前空間

その他の技術情報

属性使用したメタデータ拡張

VerificationAttribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

VerificationAttribute クラス
System.Web.UI 名前空間

その他の技術情報

属性使用したメタデータ拡張

VerificationAttribute メンバ

Web コンテンツアクセシビリティ規則メタデータ属性定義します。このクラス継承できません。

VerificationAttribute データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド VerificationAttribute オーバーロードされます。 VerificationAttribute クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Checkpoint 指定した Guideline プロパティの、アクセシビリティチェックポイント参照取得します
パブリック プロパティ ConditionalProperty アクセシビリティチェックポイント検証一部として使用する条件式左辺取得します
パブリック プロパティ ConditionalValue アクセシビリティチェックポイント検証一部として使用する条件式右辺取得します
パブリック プロパティ Guideline アクセシビリティチェック使用するガイドライン取得します
パブリック プロパティ GuidelineUrl Guideline プロパティ指定されるアクセシビリティガイドラインについての詳細情報取得するために使用できる URL取得します
パブリック プロパティ Message アクセシビリティチェックポイント検証規則true場合に、メッセージ文字列取得します
パブリック プロパティ Priority アクセシビリティチェックポイント優先度取得します
パブリック プロパティ TypeId  派生クラス実装されている場合は、この Attribute一意識別子取得します。(Attribute から継承されます。)
パブリック プロパティ VerificationConditionalOperator アクセシビリティチェックポイント検証方法を示す VerificationConditionalOperator 列挙値を取得します
パブリック プロパティ VerificationReportLevel アクセシビリティチェックポイント使用方法を示す VerificationReportLevel 列挙値を取得します
パブリック プロパティ VerificationRule アクセシビリティチェックポイント使用方法を示す VerificationRule 列挙値を取得します
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

VerificationAttribute クラス
System.Web.UI 名前空間

その他の技術情報

属性使用したメタデータ拡張



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「VerificationAttribute」の関連用語

VerificationAttributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



VerificationAttributeのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS