Show / Hide Table of Contents

Class FilterMap

Plain filter map used to support filtering for resource versions 6 and prior. Contains a Dictionary of key/value pairs for each key/value in the URL filter.


    Examples:

    //Creates: "persons?firstName=John&lastName=Smith"
    string resource = "persons";
    string version = "application/vnd.hedtech.integration.v6+json";
    string filterKey = "firstName";
    string filterValue = "John";

    FilterMap filterMap = new FilterMap()
    .WithParameterPair( filterKey, filterValue )
    .WithParameterPair( "lastName", "Smith" )
    .Build();

    //Another example
    //Creates: "persons?firstName=John"
    string resource = "persons";
    string version = "application/vnd.hedtech.integration.v6+json";
    string filterMapKey = "firstName";
    string filterMapValue = "John";

    FilterMap filterMap = new FilterMap()
    .WithParameterPair( filterMapKey, filterMapValue )
    .Build();
Inheritance
System.Object
FilterMap
Namespace: Ellucian.Ethos.Integration.Client.Proxy.Filter
Assembly: Ellucian.Ethos.Integration.dll
Syntax
public class FilterMap : object

Constructors

FilterMap()

Instantiate FilterMap.

Declaration
public FilterMap()

Fields

filterPairMap

Map of string key/value pairs containing filter parameters.

Declaration
readonly Dictionary<string, string> filterPairMap
Field Value
Type Description
Dictionary<System.String, System.String>

Methods

Build()

Builds a FilterMap instance with the parameter pairs previously provided.

Declaration
public FilterMap Build()
Returns
Type Description
FilterMap

Returns this instance with filterPairMap.

GetFilterMapKeys()

Gets a list of filter pair keys from the filterPairMap.

Declaration
public IEnumerable<string> GetFilterMapKeys()
Returns
Type Description
IEnumerable<System.String>

A IEnumerable<string> of filter keys.

GetFilterMapValue(String)

Gets a filter map value using the given key.

Declaration
public string GetFilterMapValue(string key)
Parameters
Type Name Description
System.String key

The filter map key used to retrieve a filter map value.

Returns
Type Description
System.String

The value associated with the given key in the filterPairMap.

ToString()

Provides a string representation of this CriteriaFilter. This method should be called to produce the entire CriteriaFilter string used when making a request containing a criteria filter.

Declaration
public override string ToString()
Returns
Type Description
System.String

A JSON formatted string containing the proper syntax of a CriteriaFilter.

WithParameterPair(String, String)

Adds a key/value pair as a filter parameter to the filterMap.

Declaration
public FilterMap WithParameterPair(string filterKey, string filterValue)
Parameters
Type Name Description
System.String filterKey

The key for the filter parameter.

System.String filterValue

The value of the filter parameter.

Returns
Type Description
FilterMap

This FilterMap for fluency in supporting multiple filter parameters.

In This Article
Back to top Generated by DocFX