Freigeben über


HierarchyCollection.Add Method

Definition

Overloads

Add()

Creates a new Hierarchy object using a generated unique Name and identifier, adds it to the end of the collection and returns the new Hierarchy created.

Add(Hierarchy)

Adds the specified Hierarchy to the end of the collection.

Add(String)

Creates a new Hierarchy object using the specified name, adds it to the end of the collection and returns the new Hierarchy created.

Add(String, Boolean)

Creates and adds a Hierarchy, with the specified name, to the end of the collection.

Add(String, String)

Creates a new Hierarchy object using the specified name and identifier, adds it to the end of the collection and returns the new Hierarchy created.

Add()

Creates a new Hierarchy object using a generated unique Name and identifier, adds it to the end of the collection and returns the new Hierarchy created.

public Microsoft.AnalysisServices.Hierarchy Add ();
override this.Add : unit -> Microsoft.AnalysisServices.Hierarchy
Public Function Add () As Hierarchy

Returns

The newly created Hierarchy object.

Applies to

Add(Hierarchy)

Adds the specified Hierarchy to the end of the collection.

public int Add (Microsoft.AnalysisServices.Hierarchy item);
override this.Add : Microsoft.AnalysisServices.Hierarchy -> int
Public Function Add (item As Hierarchy) As Integer

Parameters

item
Hierarchy

The Hierarchy to be added.

Returns

The zero-based index at which the Hierarchy has been added to the collection.

Exceptions

  • The specified item is a null reference (Nothing in Visual Basic).
  • The specified item already esists in the collection.
  • The identifier of the specified Hierarchy is not valid in the collection.
  • The name of the specified Hierarchy is not valid in the collection.
  • The compatibility-level of the specified Hierarchy is not valid in the collection.

Applies to

Add(String)

Creates a new Hierarchy object using the specified name, adds it to the end of the collection and returns the new Hierarchy created.

public Microsoft.AnalysisServices.Hierarchy Add (string name);
override this.Add : string -> Microsoft.AnalysisServices.Hierarchy
Public Function Add (name As String) As Hierarchy

Parameters

name
String

The Name for the new Hierarchy object.

Returns

The newly created Hierarchy object.

Exceptions

The specified name is not valid in the collection.

Remarks

The identifier for the new Hierarchy object is generated based on the specified name.

Applies to

Add(String, Boolean)

Creates and adds a Hierarchy, with the specified name, to the end of the collection.

public Microsoft.AnalysisServices.Hierarchy Add (string name, bool updateDependents);
override this.Add : string * bool -> Microsoft.AnalysisServices.Hierarchy
Public Function Add (name As String, updateDependents As Boolean) As Hierarchy

Parameters

name
String

The name of the Hierarchy to be added.

updateDependents
Boolean

Indicates whether the dependents of the Hierarchy should be updated.

Returns

The newly created Hierarchy object.

Exceptions

The specified name is not valid in the collection.

Applies to

Add(String, String)

Creates a new Hierarchy object using the specified name and identifier, adds it to the end of the collection and returns the new Hierarchy created.

public Microsoft.AnalysisServices.Hierarchy Add (string name, string id);
override this.Add : string * string -> Microsoft.AnalysisServices.Hierarchy
Public Function Add (name As String, id As String) As Hierarchy

Parameters

name
String

The Name for the new Hierarchy object.

id
String

The identifier for the new Hierarchy object.

Returns

The newly created Hierarchy object.

Exceptions

  • The specified name is not valid in the collection.
  • The specified identifier is not valid in the collection.

Applies to