次の方法で共有


Measure クラス

キューブまたはメジャー グループ内のメジャーを表します。

継承階層

System. . :: . .Object
  Microsoft.AnalysisServices.AdomdClient..::..Measure

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

構文

'宣言
Public NotInheritable Class Measure
'使用
Dim instance As Measure
public sealed class Measure
public ref class Measure sealed
[<SealedAttribute>]
type Measure =  class end
public final class Measure

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

プロパティ

  名前 説明
パブリック プロパティ Caption Measure のキャプションを取得します。
パブリック プロパティ Description Measure の説明を取得します。
パブリック プロパティ DisplayFolder このメンバは将来使用するために予約されています。
パブリック プロパティ Expression Measure を集計するために使用される多次元式 (MDX) を取得します。
パブリック プロパティ Name Measure の名前を取得します。
パブリック プロパティ NumericPrecision Measure の数値有効桁数の値を取得します。
パブリック プロパティ NumericScale Measure の数値の小数点以下桁数を取得します。
パブリック プロパティ ParentCube Measure を含む CubeDef を取得します。
パブリック プロパティ Properties Measure に関連付けられたプロパティを含む AdomdPropertyCollection を取得します。
パブリック プロパティ UniqueName Measure の一意の名前を取得します。
パブリック プロパティ Units Measure に対するメジャーの単位の説明を取得します。

先頭に戻る

メソッド

  名前 説明
パブリック メソッド Equals Measure の 2 つのインスタンスが等しいかどうかを示します。 (Object. . :: . .Equals(Object) をオーバーライドします。)
プロテクト メソッド Finalize (Object から継承されています。)
パブリック メソッド GetHashCode ハッシュ アルゴリズムや、ハッシュ テーブルなどのデータ構造での使用に適した、特定の種類のハッシュ関数として機能します。 (Object. . :: . .GetHashCode() () () () をオーバーライドします。)
パブリック メソッド GetType (Object から継承されています。)
プロテクト メソッド MemberwiseClone (Object から継承されています。)
パブリック メソッド ToString Measure の現在インスタンスを表す String を返します。 (Object. . :: . .ToString() () () () をオーバーライドします。)

先頭に戻る

演算子

  名前 説明
パブリック演算子静的メンバー Equality Measure の 2 つのインスタンスが等しいかどうかを示します。
パブリック演算子静的メンバー Inequality Measure の 2 つのインスタンスが等しいかどうかを示します。

先頭に戻る

説明

メジャーは、キューブによって構成および集計されたファクト テーブル内のデータを表します。

ADOMD.NET では、Measure はキューブ内のメジャーに対するメタデータを表します。メジャーは、クエリ目的のメンバとして扱われ、CubeDef の Measures コレクション内の Measure によって表されるので、メジャーはセル セット内では明示的に識別されません。

使用例

次のサブルーチンでは、CubeDef を受け取り、Measures コレクションを繰り返し処理し、各 Measure の情報を表示します。

Public Sub ListMeasures(ByRef CubeToCheck As CubeDef)

    ' Check the parameter before performing actions on it.
    If CubeToCheck Is Nothing Then
        Throw New System.ArgumentNullException("CubeToCheck")
    Else
        ' Iterate through the Measures collection of the
        ' CubeDef object.

        Try
            Dim measureToCheck As Measure

            Debug.WriteLine("Found " & CubeToCheck.Measures.Count & _
                " measure(s) in cube:")

            For Each measureToCheck In CubeToCheck.Measures
                Debug.WriteLine("Measure:  " & measureToCheck.Name)
                Debug.WriteLine("  Caption:        " & _
                    measureToCheck.Caption)
                Debug.WriteLine("  Description:    " & _
                    measureToCheck.Description)

            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) のメンバーはすべて、スレッド セーフです。インスタンス メンバーの場合は、スレッド セーフであるとは限りません。