Class
ParameterCollection

Represents a collection of Parameter objects used for configuring report parameters in the HTML5 WebForms ReportViewer. Used to manage parameter values that are passed to reports during initialization and processing.

Definition

Namespace:Telerik.ReportViewer.Html5.WebForms

Assembly:Telerik.ReportViewer.Html5.WebForms.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(ParameterCollectionConverter))]
public class ParameterCollection : Collection<Parameter>

Inheritance: objectCollection<Parameter>ParameterCollection

Constructors

ParameterCollection()

Declaration

cs-api-definition
public ParameterCollection()

Properties

this[string]

Gets a Parameter by name from the collection.

Declaration

cs-api-definition
public Parameter this[string name] { get; }

Parameters

name

string

The name of the parameter to retrieve.

Property Value

Parameter

The Parameter object with the specified name if found; otherwise, null.

Remarks

Provides indexed access to parameters by name for convenient parameter value retrieval and assignment.

Methods

Add(string, object)

Creates a Parameter with specific settings and adds it to the ParameterCollection or updates an existing one.

Declaration

cs-api-definition
public void Add(string name, object value)

Parameters

name

string

A string value that will be used as Name for the newly created Parameter.

value

object

A object value that will be used as Value for the newly created Parameter. Can be an expression.

AddRange(IEnumerable<Parameter>)

Adds/updates an enumerable of Parameter objects to/in the ParameterCollection.

Declaration

cs-api-definition
public void AddRange(IEnumerable<Parameter> collection)

Parameters

collection

IEnumerable<Parameter>

An enumerable of Parameter objects to add to/update in the ParameterCollection.

Remarks

The Parameter objects returned from the enumerable are appended to the end of the ParameterCollection or updated in place.

Contains(string)

Determines whether the ParameterCollection contains a parameter with a specific name.

Declaration

cs-api-definition
public bool Contains(string name)

Parameters

name

string

A string that specifies the parameter name for which to search the elements of the ParameterCollection.

Returns

bool

Returns a bool value indicating whether the ParameterCollection object contains a parameter with the specified name.

Equals(ParameterCollection)

Determines whether the current ParameterCollection is equal to another ParameterCollection by comparing all parameter values.

Declaration

cs-api-definition
public bool Equals(ParameterCollection other)

Parameters

other

ParameterCollection

The ParameterCollection to compare with the current collection.

Returns

bool

True if the collections contain the same parameters in the same order; otherwise, false.

Remarks

Performs deep comparison of all parameters including their names and values for collection equality determination.

Equals(object)

Determines whether the current ParameterCollection is equal to the specified object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current ParameterCollection.

Returns

bool

True if the specified object is a ParameterCollection and is equal to the current collection; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Serves as the default hash function for the ParameterCollection.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code based on all parameters in the collection for use in hash-based collections.

Overrides object.GetHashCode()

Remarks

Calculates a hash code from all parameters in the collection to support proper hash table operations.

IndexOf(string)

Determines the index of a specific parameter in the ParameterCollection.

Declaration

cs-api-definition
public int IndexOf(string name)

Parameters

name

string

The parameter name used to locate the parameter in the ParameterCollection.

Returns

int

The index of parameter if found in the ParameterCollection; otherwise, -1.

InsertItem(int, Parameter)

Inserts a parameter at the specified index, or updates an existing parameter if one with the same name already exists.

Declaration

cs-api-definition
protected override void InsertItem(int index, Parameter item)

Parameters

index

int

The zero-based index at which the parameter should be inserted.

item

Parameter

The Parameter object to insert into the collection.

Overrides Collection<Parameter>.InsertItem(int, Parameter)

Remarks

If a parameter with the same name already exists, the existing parameter's value is updated instead of adding a duplicate.

SetItem(int, Parameter)

Sets the parameter at the specified index, or updates an existing parameter if one with the same name already exists.

Declaration

cs-api-definition
protected override void SetItem(int index, Parameter item)

Parameters

index

int

The zero-based index at which the parameter should be set.

item

Parameter

The Parameter object to set in the collection.

Overrides Collection<Parameter>.SetItem(int, Parameter)

Remarks

If a parameter with the same name already exists at a different index, the existing parameter's value is updated instead of setting at the specified index.

ToString()

Returns a string representation of the ParameterCollection containing all parameter information.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A semicolon-separated string containing the string representation of all parameters in the collection.

Overrides object.ToString()

Remarks

Provides a compact string representation of all parameters for debugging and logging purposes.