static IReadOnlyList<FilterPart> Parse( string value )

book_4_sparkGenerated
code_blocksInput

Description

The `Parse` method of the `FilterPart` struct in the `Editor.NodeEditor` namespace is a static method that takes a string input and returns a read-only list of `FilterPart` objects. This method is used to parse a given string into its constituent filter parts, which can then be used for further processing or evaluation within the node editor context.

Usage

To use the `Parse` method, call it statically on the `FilterPart` struct, passing a string that represents the filter expression you wish to parse. The method will return a list of `FilterPart` objects, each representing a segment of the parsed filter expression. Ensure that the input string is correctly formatted according to the expected syntax for filter expressions in your application context.

Example

// Example usage of the FilterPart.Parse method
string filterExpression = "type:enemy health>50";
IReadOnlyList<FilterPart> filterParts = FilterPart.Parse(filterExpression);

foreach (var part in filterParts)
{
    Console.WriteLine($"Modifier: {part.Modifier}, Value: {part.Value}");
}