A Sandcastle Documented Class Library

# ScriptToken Constructor (Guid, Guid, TokenOwnerKind, TokenDisplayTypes, CompatibleDataTypes, String, IHierarchy)

Initializes a new instance of the ScriptToken class.

Namespace: Dundas.BI.Data.Parameters.Tokens
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public ScriptToken(
    	Guid projectId,
    	Guid ownerId,
    	TokenOwnerKind ownerKind,
    	TokenDisplayTypes displayType,
    	CompatibleDataTypes dataType,
    	string statement,
    	IHierarchy hierarchy
    )

    Public Sub New (
    	projectId As Guid,
    	ownerId As Guid,
    	ownerKind As TokenOwnerKind,
    	displayType As TokenDisplayTypes,
    	dataType As CompatibleDataTypes,
    	statement As String,
    	hierarchy As IHierarchy
    )

    public:
    ScriptToken(
    	Guid projectId,
    	Guid ownerId,
    	TokenOwnerKind ownerKind,
    	TokenDisplayTypes displayType,
    	CompatibleDataTypes dataType,
    	String^ statement,
    	IHierarchy^ hierarchy
    )

    new :
            projectId : Guid *
            ownerId : Guid *
            ownerKind : TokenOwnerKind *
            displayType : TokenDisplayTypes *
            dataType : CompatibleDataTypes *
            statement : string *
            hierarchy : IHierarchy -> ScriptToken

#### Parameters

projectId
  Type: System
  Guid
  The ID of the project associated with the token. Specify Empty if the token is not associated with a project.
ownerId
  Type: System
  Guid
  The ID of the account or tenant associated with the token. Specify Empty if there is no such association.
ownerKind
  Type: Dundas.BI.Data.Parameters.Tokens
  TokenOwnerKind
  Specifies the kind of object referenced by ownerId.
displayType
  Type: Dundas.BI.Data.Parameters.Tokens
  TokenDisplayTypes
  The display type of the token.
dataType
  Type: Dundas.BI.Data.Parameters
  CompatibleDataTypes
  The token data type.
statement
  Type: System
  String
  The script text.
hierarchy
  Type: Dundas.BI.Data.Metadata
  IHierarchy
  The hierarchy. Required for hierarchy tokens.

Exceptions

Exception | Condition
--- | ---
ArgumentException | The script text was or empty. -or- hierarchy is for hierarchy token. -or- ownerId is Empty and ownerKind is not None.
ArgumentOutOfRangeException | ownerKind is not one of the TokenOwnerKind values.

See Also

#### Reference

ScriptToken Class
ScriptToken Overload
Dundas.BI.Data.Parameters.Tokens Namespace