Terradue.OpenSearch.OpenSearchParameterValueSet.SetValuesByIdentifier C# (CSharp) Method

SetValuesByIdentifier() public method

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
return void
        public void SetValuesByIdentifier(string namespaceUri, string localName, IEnumerable<string> values)
        {
            if (namespaceUri == null) throw new ArgumentNullException("namespaceUri");
            if (localName == null) throw new ArgumentNullException("localName");
            if (nameTable == null) throw new OpenSearchException("No namespace information available");
            string namespaceUri2 = nameTable.Get(namespaceUri);
            bool valid = (namespaceUri2 != null);

            OpenSearchParameterDefinition paramDef = valid ? parametersByIdentifier.Values.SingleOrDefault(p => namespaceUri2.Equals(p.IdentifierNamespaceUri) && localName == p.IdentifierLocalName) : null;
            if (paramDef == null) throw new OpenSearchException(String.Format("Parameter {{{0}}}.{1} is unknown", namespaceUri, localName));
            this.values[paramDef] = values.ToArray();
        }

Same methods

OpenSearchParameterValueSet::SetValuesByIdentifier ( string identifier, IEnumerable values ) : void