Measure 클래스

Represents a measure within a cube or measure group.

상속 계층

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 Gets the caption of the Measure.
공용 속성 Description Gets the description of the Measure.
공용 속성 DisplayFolder This member is reserved for future use.
공용 속성 Expression Gets the Multidimensional Expressions (MDX) expression that is used to aggregate the Measure.
공용 속성 Name Gets the name of the Measure.
공용 속성 NumericPrecision Gets the numeric precision value for the Measure.
공용 속성 NumericScale Gets the numeric scale for the Measure.
공용 속성 ParentCube Gets a CubeDef that contains the Measure.
공용 속성 Properties Gets an AdomdPropertyCollection that contains the properties associated with the Measure.
공용 속성 UniqueName Gets the unique name of the Measure.
공용 속성 Units Gets a description of the unit of measure for the Measure.

맨 위로 이동

메서드

  이름 설명
공용 메서드 Equals Determines whether two instances of Measure are equal. (Object.Equals(Object)을(를) 재정의함)
공용 메서드 GetHashCode Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures such as hash tables. (Object.GetHashCode()을(를) 재정의함)
공용 메서드 GetType (Object에서 상속됨)
공용 메서드 ToString Returns a String that represents the current instance of the Measure. (Object.ToString()을(를) 재정의함)

맨 위로 이동

연산자

  이름 설명
공용 연산자정적 멤버 Equality Determines whether two instances of Measure are equal.
공용 연산자정적 멤버 Inequality Determines whether two instances of Measure are unequal.

맨 위로 이동

주의

A measure represents the data within a fact table that is being organized and aggregated by the cube.

In ADOMD.NET, the Measure represents the metadata for a measure within a cube. A measure is not explicitly identified in a cellset, because a measure is treated as a member for querying purposes and is represented by a Measure within the Measures collection of a CubeDef.

The following subroutine, given a CubeDef, iterates through the Measures collection and displays information for each 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

스레드 보안

이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

참고 항목

참조

Microsoft.AnalysisServices.AdomdClient 네임스페이스