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; nullnull 引用(在 Visual Basic 中为 Nothing) if not applicable.
注释
The return value will be nullnull 引用(在 Visual Basic 中为 Nothing) 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;
}