C# Класс Terradue.OpenSearch.OpenSearchParameterValueSet

Represents the search values related to an OpenSearch request and provides useful methods for managing and converting OpenSearch values.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddExtraParameter ( string name ) : void

Adds an extra parameter not defined by the OpenSearch description.

This method can be useful if there are unpublicized OpenSearch parameters that need to be set. In such cases it is necessary to add the parameter definition before setting its value.

FromOpenSearchDescription ( OpenSearchDescription osd, string format ) : OpenSearchParameterValueSet

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearchDescriptionUrl object.

FromOpenSearchDescription ( OpenSearchDescriptionUrl osdUrl, XmlSerializerNamespaces namespaces = null ) : OpenSearchParameterValueSet

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearchDescriptionUrl object.

FromOpenSearchDescription ( string template, OpenSearchDescriptionUrlParameter origParams = null, XmlSerializerNamespaces namespaces = null ) : OpenSearchParameterValueSet

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearch template and optional additional parameter information.

GetQueryString ( bool allParameters ) : string

Gets a NameValueCollection representing the parameters and their values.

GetValues ( bool allParameters ) : NameValueCollection

Gets a NameValueCollection representing the parameters and their values.

GetValuesByIdentifier ( string identifier ) : string[]

Returns the values of the parameter specified by its identifier.

GetValuesByIdentifier ( string namespaceUri, string localName ) : string[]

Returns the values of the parameter specified by its identifier namespace URI and local name.

GetValuesByName ( string name ) : string[]

Returns the values of the parameter specified by its name.

SetValueByIdentifier ( string identifier, string value ) : void

Sets the value for the OpenSearch parameter specified by its identifier.

SetValueByIdentifier ( string namespaceUri, string localName, string value ) : void

Sets the value for the OpenSearch parameter specified by its identifier namespace URI and local name.

SetValueByName ( string name, string value ) : void

Sets the value for the OpenSearch parameter specified by its name.

SetValues ( NameValueCollection values ) : void

Sets the parameter values based on the specified NameValueCollection.

Only matching parameters are taken into account. The match is made by the query string name of the parameter.

SetValuesByIdentifier ( string identifier, IEnumerable values ) : void

Sets multiple values for the OpenSearch parameter specified by its identifier.

SetValuesByIdentifier ( string namespaceUri, string localName, IEnumerable values ) : void

Sets multiple values for the OpenSearch parameter specified by its identifier namespace URI and local name.

SetValuesByName ( string name, IEnumerable values ) : void

Sets multiple values for the OpenSearch parameter specified by its name.

TranslateFrom ( OpenSearchParameterValueSet source, bool verifyNamespaces = false ) : void

Sets the parameter values based on the values of another instance.

Only matching parameters are taken into account. The match is made by the fully qualified identifier of the OpenSearch parameters. In the default case it is assumed that the namespace prefixes used for the identifiers refer to the same namespaces in both value sets, however, the namespaces can be verified fully.

Защищенные методы

Метод Описание
OpenSearchParameterValueSet ( ) : System

Описание методов

AddExtraParameter() публичный Метод

Adds an extra parameter not defined by the OpenSearch description.
This method can be useful if there are unpublicized OpenSearch parameters that need to be set. In such cases it is necessary to add the parameter definition before setting its value.
public AddExtraParameter ( string name ) : void
name string The name of the parameter.
Результат void

FromOpenSearchDescription() публичный статический Метод

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearchDescriptionUrl object.
public static FromOpenSearchDescription ( OpenSearchDescription osd, string format ) : OpenSearchParameterValueSet
osd Terradue.OpenSearch.Schema.OpenSearchDescription
format string
Результат OpenSearchParameterValueSet

FromOpenSearchDescription() публичный статический Метод

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearchDescriptionUrl object.
public static FromOpenSearchDescription ( OpenSearchDescriptionUrl osdUrl, XmlSerializerNamespaces namespaces = null ) : OpenSearchParameterValueSet
osdUrl Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl An OpenSearchDescriptionUrl object from a deserialized OpenSearch description document.
namespaces System.Xml.Serialization.XmlSerializerNamespaces
Результат OpenSearchParameterValueSet

FromOpenSearchDescription() публичный статический Метод

Creates an OpenSearchParameterValueSet instance based on the specified OpenSearch template and optional additional parameter information.
public static FromOpenSearchDescription ( string template, OpenSearchDescriptionUrlParameter origParams = null, XmlSerializerNamespaces namespaces = null ) : OpenSearchParameterValueSet
template string An OpenSearch template URL.
origParams Terradue.OpenSearch.Schema.OpenSearchDescriptionUrlParameter
namespaces System.Xml.Serialization.XmlSerializerNamespaces
Результат OpenSearchParameterValueSet

GetQueryString() публичный Метод

Gets a NameValueCollection representing the parameters and their values.
public GetQueryString ( bool allParameters ) : string
allParameters bool If set to true, the NameValueCollection includes also unset parameters.
Результат string

GetValues() публичный Метод

Gets a NameValueCollection representing the parameters and their values.
public GetValues ( bool allParameters ) : NameValueCollection
allParameters bool If set to true, the NameValueCollection includes also unset parameters.
Результат System.Collections.Specialized.NameValueCollection

GetValuesByIdentifier() публичный Метод

Returns the values of the parameter specified by its identifier.
public GetValuesByIdentifier ( string identifier ) : string[]
identifier string The parameter identifier, i.e. the fully qualified identifier between the curly brackets in the OpenSearch description URL template, e.g. "geo:box".
Результат string[]

GetValuesByIdentifier() публичный Метод

Returns the values of the parameter specified by its identifier namespace URI and local name.
public GetValuesByIdentifier ( string namespaceUri, string localName ) : string[]
namespaceUri string The namespace URI part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "http://a9.com/-/opensearch/extensions/geo/1.0/".
localName string The local name part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "box".
Результат string[]

GetValuesByName() публичный Метод

Returns the values of the parameter specified by its name.
public GetValuesByName ( string name ) : string[]
name string The parameter name, as in the query string.
Результат string[]

OpenSearchParameterValueSet() защищенный Метод

protected OpenSearchParameterValueSet ( ) : System
Результат System

SetValueByIdentifier() публичный Метод

Sets the value for the OpenSearch parameter specified by its identifier.
public SetValueByIdentifier ( string identifier, string value ) : void
identifier string The parameter identifier, i.e. the fully qualified identifier between the curly brackets in the OpenSearch description URL template, e.g. "geo:box".
value string The value.
Результат void

SetValueByIdentifier() публичный Метод

Sets the value for the OpenSearch parameter specified by its identifier namespace URI and local name.
public SetValueByIdentifier ( string namespaceUri, string localName, string value ) : void
namespaceUri string The namespace URI part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "http://a9.com/-/opensearch/extensions/geo/1.0/".
localName string The local name part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "box".
value string The value.
Результат void

SetValueByName() публичный Метод

Sets the value for the OpenSearch parameter specified by its name.
public SetValueByName ( string name, string value ) : void
name string The parameter name, as in the query string.
value string
Результат void

SetValues() публичный Метод

Sets the parameter values based on the specified NameValueCollection.
Only matching parameters are taken into account. The match is made by the query string name of the parameter.
public SetValues ( NameValueCollection values ) : void
values System.Collections.Specialized.NameValueCollection The NameValueCollection containing the values to be used.
Результат void

SetValuesByIdentifier() публичный Метод

Sets multiple values for the OpenSearch parameter specified by its identifier.
public SetValuesByIdentifier ( string identifier, IEnumerable values ) : void
identifier string The parameter identifier, i.e. the fully qualified identifier between the curly brackets in the OpenSearch description URL template, e.g. "geo:box".
values IEnumerable An array containing the values.
Результат void

SetValuesByIdentifier() публичный Метод

Sets multiple values for the OpenSearch parameter specified by its identifier namespace URI and local name.
public SetValuesByIdentifier ( string namespaceUri, string localName, IEnumerable values ) : void
namespaceUri string The namespace URI part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "http://a9.com/-/opensearch/extensions/geo/1.0/".
localName string The local name part of the fully qualified identifier of this parameter as defined in the OpenSearch description URL template, e.g. "box".
values IEnumerable
Результат void

SetValuesByName() публичный Метод

Sets multiple values for the OpenSearch parameter specified by its name.
public SetValuesByName ( string name, IEnumerable values ) : void
name string The parameter name, as in the query string.
values IEnumerable An array containing the values.
Результат void

TranslateFrom() публичный Метод

Sets the parameter values based on the values of another instance.
Only matching parameters are taken into account. The match is made by the fully qualified identifier of the OpenSearch parameters. In the default case it is assumed that the namespace prefixes used for the identifiers refer to the same namespaces in both value sets, however, the namespaces can be verified fully.
public TranslateFrom ( OpenSearchParameterValueSet source, bool verifyNamespaces = false ) : void
source OpenSearchParameterValueSet The OpenSearchParameterValueSet that serves as source.
verifyNamespaces bool If set to true, the parameters are matched by namespace URI and local name, rather than just prefix and local name. The default is false.
Результат void