次の方法で共有


PropertyCollection クラス

CellSet に含まれる Property オブジェクトの読み取り専用のコレクションを取得します。

継承階層

System.Object
  Microsoft.AnalysisServices.AdomdClient.PropertyCollection

名前空間:  Microsoft.AnalysisServices.AdomdClient
アセンブリ:  Microsoft.AnalysisServices.AdomdClient (Microsoft.AnalysisServices.AdomdClient.dll)

構文

'宣言
Public NotInheritable Class PropertyCollection _
    Implements ICollection, IEnumerable
'使用
Dim instance As PropertyCollection
public sealed class PropertyCollection : ICollection, 
    IEnumerable
public ref class PropertyCollection sealed : ICollection, 
    IEnumerable
[<SealedAttribute>]
type PropertyCollection =  
    class 
        interface ICollection 
        interface IEnumerable 
    end
public final class PropertyCollection implements ICollection, IEnumerable

PropertyCollection 型は、以下のメンバーを公開しています。

プロパティ

  名前 説明
パブリック プロパティ Count コレクションに含まれる Property オブジェクトの数を取得します。
パブリック プロパティ IsSynchronized コレクションへのアクセスが同期されるかどうか (スレッドセーフかどうか) を示す値を取得します。
パブリック プロパティ Item[Int32] 指定したインデックスの Property を PropertyCollection コレクションから取得します。Microsoft Visual C# の場合、このプロパティは PropertyCollection クラスのインデクサーとなります。
パブリック プロパティ Item[String] 指定した名前の Property を PropertyCollection コレクションから取得します。Microsoft Visual C# の場合、このプロパティは PropertyCollection クラスのインデクサーとなります。
パブリック プロパティ SyncRoot PropertyCollection コレクションへのアクセスの同期に使用できるオブジェクトを取得します。

先頭に戻る

メソッド

  名前 説明
パブリック メソッド CopyTo 指定した配列に PropertyCollection コレクションの要素をコピーします。
パブリック メソッド Equals (Object から継承されています。)
パブリック メソッド Find 指定した名前の Property を PropertyCollection コレクションから取得します。
パブリック メソッド GetEnumerator PropertyCollection コレクションの反復処理に使用する Enumerator を取得します。
パブリック メソッド GetHashCode (Object から継承されています。)
パブリック メソッド GetType (Object から継承されています。)
パブリック メソッド ToString (Object から継承されています。)

先頭に戻る

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

  名前 説明
明示的なインターフェイスの実装プライベート メソッド ICollection.CopyTo 特定の配列インデックスを開始位置として、指定した配列に PropertyCollection の要素をコピーします。
明示的なインターフェイスの実装プライベート メソッド IEnumerable.GetEnumerator PropertyCollection を反復処理する列挙子を取得します。

先頭に戻る

説明

PropertyCollection は、クエリによって返される軸を表すために、CellSet によって使用されます。 PropertyCollection に含まれる各 Property は、1 つ以上の階層に沿って構成された、適合する組のセットを表します。

注意

フィルター Property は、このコレクションに含まれません。 フィルター Property にアクセスするには、CellSet の OlapInfo.AxesInfo.FilterAxes プロパティを参照する必要があります。

使用例

次のサブルーチンでは、CellSet を受け取り、PropertyCollection (CellSetAxes プロパティによって表されます) を繰り返し処理し、各 Property の情報を表示します。

Public Sub ListAxes(ByRef cellsetToCheck As CellSet)

    ' Check the parameter before performing actions on it.
    If cellsetToCheck Is Nothing Then
        Throw New System.ArgumentNullException("cellsetToCheck")
    Else
        ' Iterate through the axes of the
        ' CellSet object. The Axes property of the 
        ' CellSet object returns a reference to the
        ' PropertyCollection object.

        Try
            Dim PropertyToCheck As Property

            Debug.WriteLine("Found " & cellsetToCheck.Axes.Count & _
                " axes in cellset:")

            For Each PropertyToCheck In cellsetToCheck.Axes

                Debug.WriteLine("  Name:  " & _
                    PropertyToCheck.Name)
            Next
        Catch ex As AdomdConnectionException
            ' The connection could not be opened or was disconnected.
            ' This error can occur at any time, if the provider is 
            ' disconnected from the server.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdErrorResponseException
            ' A response is received from a provider which indicates an error.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdUnknownResponseException
            ' A response has been returned from the provider that 
            ' was not understood.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdCacheExpiredException
            ' A cached version of an ADOMD.NET object is no longer valid.
            ' This error is typically raised when reviewing metadata.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdException
            ' Any other error raised by ADOMD.NET.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As Exception
            ' Any other error.
            Debug.WriteLine(ex)
            Throw ex
        End Try
    End If
End Sub

スレッド セーフ

この型の public static (Visual Basic では Shared) のメンバーはすべて、スレッド セーフです。インスタンス メンバーの場合は、スレッド セーフであるとは限りません。

関連項目

参照

Microsoft.AnalysisServices.AdomdClient 名前空間