C# Class RightScale.netClient.Filter

Class encapsulates the parameters of a RightScale API filter and overrides the ToString() method to build a formatted string filter
Exibir arquivo Open project: rs-services/RightScaleNetAPI Class Usage Examples

Public Methods

Method Description
Filter ( string key, FilterOperator filterType, string value ) : System

Creates a new instance of a filter

ToFilterOnlyString ( ) : string

Method gets filter only portion of a filter object for reformatting within a parameter set for POST and PUT calls

ToString ( ) : string

Override of ToString method to generate properly formatted string representation of filtre

parseFilter ( string filterString ) : Filter

Static method returns a single intance of a Filter object from the given filter string

parseFilterList ( string filterString ) : List

Static method returns a colection of Filter Objects from a filter string

Private Methods

Method Description
getOpSign ( FilterOperator filterOp ) : string

Private method gets string representation of the current Operator value

parseFilterFromString ( string workingString, FilterOperator filterOp ) : Filter

Private method handles parsing filter from string based on inputs

parseFilterString ( string filterString ) : Filter

Private method handles the internals of parsing a string into an instance of a Filter object

Method Details

Filter() public method

Creates a new instance of a filter
public Filter ( string key, FilterOperator filterType, string value ) : System
key string name of the field to filter on
filterType FilterOperator Equal or NotEqual
value string value to use for filtering
return System

ToFilterOnlyString() public method

Method gets filter only portion of a filter object for reformatting within a parameter set for POST and PUT calls
public ToFilterOnlyString ( ) : string
return string

ToString() public method

Override of ToString method to generate properly formatted string representation of filtre
public ToString ( ) : string
return string

parseFilter() public static method

Static method returns a single intance of a Filter object from the given filter string
public static parseFilter ( string filterString ) : Filter
filterString string query string formatted filter for a single filter
return Filter

parseFilterList() public static method

Static method returns a colection of Filter Objects from a filter string
public static parseFilterList ( string filterString ) : List
filterString string query string formatted filter (key==/<>value) or (filter[]=key==/<>value) for a list of filters
return List