FilterableAttribute クラス

定義

属性を適用するプロパティがデバイスのフィルター処理をサポートするかどうかを指定します。 このクラスは継承できません。

public ref class FilterableAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Property)]
public sealed class FilterableAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Property)>]
type FilterableAttribute = class
    inherit Attribute
Public NotInheritable Class FilterableAttribute
Inherits Attribute
継承
FilterableAttribute
属性

次のコード例では、カスタム コントロールのプロパティに FilterableAttribute 属性を適用して、プロパティがデバイス のフィルター処理をサポートしていないことを示す方法を示します。


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Samples.AspNet.CS.Controls
{
    public class SimpleCustomControl : WebControl
    {
        private string _productID;

        // Set Filterable attribute to specify that this
        // property does not support device filtering.
        [Bindable(true)]
        [Filterable(false)]
        public string ProductID
        {
            get
            {
                return _productID;
            }
            set
            {
                _productID = value;
            }
        }
    }
}

Imports System.ComponentModel
Imports System.Web.UI

Namespace Samples.AspNet.VB.Controls

    Public Class SimpleCustomControl
        Inherits System.Web.UI.WebControls.WebControl

        Dim _productID As String

        ' Set Filterable attribute to specify that this
        ' property does not support device filtering.
        <Bindable(True), Filterable(False)> Property ProductID() As String
            Get
                Return _productID
            End Get

            Set(ByVal Value As String)
                _productID = Value
            End Set
        End Property
    End Class

End Namespace

注釈

FilterableAttribute属性は、プロパティがデバイスフィルター処理をサポートするかどうかを指定するためにプロパティに適用されます。 プロパティがデバイス フィルター処理をサポートしている場合は、デバイス フィルターを指定することで、特定のデバイスのプロパティの値をオーバーライドできます。 既定では、プロパティはフィルター処理可能であるため、コントロール開発者は、 FilterableAttribute 属性を false に設定することで、プロパティに対するデバイス のフィルター処理を防ぐことができます。 詳細については、 特定のデバイスのカスタマイジングを参照してください。

属性の使用の詳細については、「 属性」を参照してください。

FilterableAttribute クラスのインスタンスの初期プロパティ値の一覧については、FilterableAttribute コンストラクターを参照してください。

コンストラクター

名前 説明
FilterableAttribute(Boolean)

FilterableAttribute クラスの新しいインスタンスを初期化します。

フィールド

名前 説明
Default

既定のプロパティ設定を持つ定義済みの FilterableAttribute オブジェクトを表します。 このフィールドは読み取り専用です。

No

プロパティがデバイス のフィルター処理をサポートしていないことを示す定義済みの FilterableAttribute オブジェクトを表します。 このフィールドは読み取り専用です。

Yes

プロパティがデバイス のフィルター処理をサポートすることを示す定義済みの FilterableAttribute オブジェクトを表します。 このフィールドは読み取り専用です。

プロパティ

名前 説明
Filterable

FilterableAttribute属性が適用されるプロパティがデバイス のフィルター処理をサポートしているかどうかを示す値を取得します。

TypeId

派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。

(継承元 Attribute)

メソッド

名前 説明
Equals(Object)

FilterableAttribute クラスの現在のインスタンスが、指定したオブジェクトと等しいかどうかを判断します。

GetHashCode()

このインスタンスのハッシュ コードを返します。

GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

FilterableAttribute クラスの現在のインスタンスがDefault属性と等しいかどうかを判断します。

IsObjectFilterable(Object)

指定した Object がデバイスのフィルター処理をサポートしているかどうかを判断します。

IsPropertyFilterable(PropertyDescriptor)

プロパティがデバイスのフィルター処理をサポートするかどうかを決定します。

IsTypeFilterable(Type)

指定したデータ型がデバイス のフィルター処理をサポートしているかどうかを判断します。

Match(Object)

派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

名前 説明
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください

  • Filterable
  • 属性 を使用したメタデータの拡張の