異なる階層のメンバーの順序付けられたコレクションを表します。
継承階層
System.Object
Microsoft.AnalysisServices.AdomdClient.Tuple
名前空間: Microsoft.AnalysisServices.AdomdClient
アセンブリ: Microsoft.AnalysisServices.AdomdClient (Microsoft.AnalysisServices.AdomdClient.dll)
構文
'宣言
Public NotInheritable Class Tuple
'使用
Dim instance As Tuple
public sealed class Tuple
public ref class Tuple sealed
[<SealedAttribute>]
type Tuple = class end
public final class Tuple
Tuple 型は、以下のメンバーを公開しています。
プロパティ
| 名前 | 説明 | |
|---|---|---|
![]() |
Members | Tuple から MemberCollection クラスのインスタンスを取得します。 |
![]() |
TupleOrdinal | Tuple の位置を示す序数を取得します。 |
先頭に戻る
メソッド
| 名前 | 説明 | |
|---|---|---|
![]() |
Equals | System.Object の 2 つのインスタンスが同一であるかどうかを示します。 (Object.Equals(Object) をオーバーライドします。) |
![]() |
GetHashCode | ハッシュ アルゴリズムや、ハッシュ テーブルなどのデータ構造で使用する、特定の種類のハッシュ関数として機能します。 (Object.GetHashCode() をオーバーライドします。) |
![]() |
GetType | (Object から継承されています。) |
![]() |
ToString | (Object から継承されています。) |
先頭に戻る
演算子
| 名前 | 説明 | |
|---|---|---|
![]() ![]() |
Equality | Tuple の 2 つの指定したインスタンスが等しいかどうかを示します。 |
![]() ![]() |
Inequality | Tuple の 2 つの指定したインスタンスが等しいかどうかを示します。 |
先頭に戻る
説明
組は、メンバーの順序付けられたコレクションで構成されます。
1 つの組は、単一の階層から複数のメンバーを含むことはできません。
ADOMD.NET では、Tuple は、組を定義する Member オブジェクトのコレクションをカプセル化することで組を表すために使用されます。 Tuple オブジェクトは、Set の Tuples プロパティを通してのみ参照できます。
使用例
次の関数は、Tuple を受け取り、オブジェクトを調べて、組の多次元式 (MDX) 文字列表記を返します。
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
スレッド セーフ
この型の public static (Visual Basic では Shared) のメンバーはすべて、スレッド セーフです。インスタンス メンバーの場合は、スレッド セーフであるとは限りません。
.gif)
.gif)
.gif)
.gif)