RoleCollection.Add RoleCollection.Add RoleCollection.Add Method

Definition

Overloads

Add() Add() Add()

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

Add(Role) Add(Role) Add(Role)

Adds the specified Role to the end of the collection.

Add(String) Add(String) Add(String)

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

Add(String, String) Add(String, String) Add(String, String)

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

Add() Add() Add()

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

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

Returns

The newly created Role object.

Add(Role) Add(Role) Add(Role)

Adds the specified Role to the end of the collection.

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

Parameters

item
Role Role Role

The Role to be added.

Returns

The zero-based index at which the Role 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 Role is not valid in the collection.
  • The name of the specified Role is not valid in the collection.
  • The compatibility-level of the specified Role is not valid in the collection.

Add(String) Add(String) Add(String)

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

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

Parameters

name
String String String

The Name for the new Role object.

Returns

The newly created Role object.

Exceptions

Remarks

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

Add(String, String) Add(String, String) Add(String, String)

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

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

Parameters

name
String String String

The Name for the new Role object.

id
String String String

The identifier for the new Role object.

Returns

The newly created Role object.

Exceptions

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

Applies to