Свойство Context.CurrentMiningModel
Gets the current mining model.
Пространство имен: Microsoft.AnalysisServices.AdomdServer
Сборка: msmgdsrv (в msmgdsrv.dll)
Синтаксис
'Декларация
Public Shared ReadOnly Property CurrentMiningModel As MiningModel
Get
'Применение
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
Значение свойства
Тип: Microsoft.AnalysisServices.AdomdServer.MiningModel
A MiningModel that represents the current mining model; nullпустая ссылка (Nothing в Visual Basic) if not applicable.
Замечания
The return value will be nullпустая ссылка (Nothing в 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 Определяемые пользователем функции и хранимые процедуры.
Примеры
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;
}