Compartilhar via


Propriedade do RDL Context.CurrentMiningModel

Gets the current mining model.

Namespace:  Microsoft.AnalysisServices.AdomdServer
Assembly:  msmgdsrv (em msmgdsrv.dll)

Sintaxe

'Declaração
Public Shared ReadOnly Property CurrentMiningModel As MiningModel 
    Get
'Uso
Dim value As MiningModel 

value = Context.CurrentMiningModel
public static MiningModel CurrentMiningModel { get; }
public:
static property MiningModel^ CurrentMiningModel {
    MiningModel^ get ();
}
static member CurrentMiningModel : MiningModel
static function get CurrentMiningModel () : MiningModel

Valor da propriedade

Tipo: Microsoft.AnalysisServices.AdomdServer.MiningModel
A MiningModel that represents the current mining model; nulluma referência nula (Nothing no Visual Basic) if not applicable.

Comentários

The return value will be nulluma referência nula (Nothing no Visual Basic) when called from a Multidimensional Expressions (MDX) query, or as a stored procedure. For more information on the differences between user-defined functions (UDFs) and stored orocedures, see Funções e procedimentos armazenados definidos pelo usuário.

Exemplos

In the following example, a UDF is created that returns the node description for a specified node. It uses the current context in which it is being run, retrieves the node from the current mining model (determined by the DMX FROM clause):

public string GetNodeDescription(string nodeUniqueName)
{
    return Context.CurrentMiningModel.GetNodeFromUniqueName(nodeUniqueName).Description;
}

Consulte também

Referência

Context Classe

Namespace Microsoft.AnalysisServices.AdomdServer