다음을 통해 공유


Tuple Class

Represents an ordered collection of members from different hierarchies.

네임스페이스: Microsoft.AnalysisServices.AdomdClient
어셈블리: Microsoft.AnalysisServices.AdomdClient (in microsoft.analysisservices.adomdclient.dll)

구문

‘선언
Public NotInheritable Class Tuple
public sealed class Tuple
public ref class Tuple sealed
public final class Tuple
public final class Tuple

주의

A tuple consists of an ordered collection of members.

A tuple cannot contain more than one member from any single hierarchy.

In ADOMD.NET, a Tuple is used to represent a tuple by encapsulating the collection of Member objects that define the tuple. Tuple objects can be referenced only through the Tuples property of a Set.

Inheritance Hierarchy

System.Object
  Microsoft.AnalysisServices.AdomdClient.Tuple

The following function, given a Tuple, examines the object and returns a Multidimensional Expressions (MDX) string representation of the tuple:

Public Function GetTupleString(ByRef TupleToConvert As Tuple) As String
    If TupleToConvert Is Nothing Then
        Throw New System.ArgumentNullException("TupleToConvert")
    Else
        Dim tupleCount As Integer = TupleToConvert.Members.Count
        Dim tupleIndex As Integer = 0

        If tupleCount = 0 Then
            ' An empty tuple.
            Return "()"
        Else
            ' Iterate through each member in the Members collection,
            ' adding the value of the UniqueName property to a
            ' string.
            ' Because a tuple can represent many members, this
            ' example uses a StringBuilder object to improve
            ' string handling performance.
            Dim tupleString As New _
                System.Text.StringBuilder(15 * tupleCount)

            ' Tuples are framed with parentheses, with each member
            ' within a tuple separated by a comma.
            tupleString.Append("(")
            For tupleIndex = 0 To tupleCount - 1
                tupleString.Append( _
                TupleToConvert.Members(tupleIndex).UniqueName)
                If tupleIndex < (tupleCount - 1) Then
                    tupleString.Append(", ")
                End If
            Next
            tupleString.Append(")")

            Return tupleString.ToString
        End If
    End If
End Function

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

Tuple Members
Microsoft.AnalysisServices.AdomdClient Namespace