Share via


ExpressionNode.ConvertFromFilterNode Method (FilterNode)

Creates a new expression node by converting a filter node.

Namespace:  Microsoft.SqlServer.Management.Dmf
Assembly:  Microsoft.SqlServer.Dmf (in Microsoft.SqlServer.Dmf.dll)

Syntax

'Declaration
Public Shared Function ConvertFromFilterNode ( _
    filterNode As FilterNode _
) As ExpressionNode
'Usage
Dim filterNode As FilterNode 
Dim returnValue As ExpressionNode 

returnValue = ExpressionNode.ConvertFromFilterNode(filterNode)
public static ExpressionNode ConvertFromFilterNode(
    FilterNode filterNode
)
public:
static ExpressionNode^ ConvertFromFilterNode(
    FilterNode^ filterNode
)
static member ConvertFromFilterNode : 
        filterNode:FilterNode -> ExpressionNode
public static function ConvertFromFilterNode(
    filterNode : FilterNode
) : ExpressionNode

Parameters

Return Value

Type: Microsoft.SqlServer.Management.Dmf.ExpressionNode
An ExpressionNode object that represents the new expression node.

Remarks

This allows you to create expression node that refers to an object or a group of objects defined by the filter.

Examples

C#

string xpath = "Server/Database[like(@Name, 'msdb') or like(@Name,'m[as]%')]";
Urn urn = new SFC.Urn (xpath);
FilterNode fnode = urn.XPathExpression[urn.XPathExpression.Length - 1].Filter;
ExpressionNode node = ExpressionNode.ConvertFromFilterNode(fnode);

Note Urn and FilterNode are SFC classes.

See Also

Reference

ExpressionNode Class

ConvertFromFilterNode Overload

Microsoft.SqlServer.Management.Dmf Namespace