///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using Common;
namespace Config.Entities
{
public interface IParamsProvider
{
///
/// Get XML Serializer
///
XmlSerializer GetSerializer();
string ComponentName { get; }
///
/// Number of parameters
///
int ParamsCount();
///
/// Returns a parameter name
///
/// Zero based index of the parameter
string ParamName(int ix);
///
/// Returns a list of possible values of one parameter (ComboBox when editing) or null (Textbox when editing).
///
/// Zero based index of the parameter
ICollection ParamValues(int ix);
///
/// Returns a parameter value in the string form
///
/// Zero based index of the parameter
string ToString(int ix);
///
/// Initialize values of all parameters
///
void InitializeAll();
///
/// Validates the string representation of a parameter
///
/// Zero based index of the parameter
/// String representation of the parameter
/// Warning message in case the string is wrong or null
/// true = string is OK, false = string is wrong (see 'message')
bool ValidateParam(int ix, string strValue, out string message);
///
/// Update the parameter from a string
///
/// Zero based index of the parameter
/// String representation of the parameter
CfgUpdateFlags UpdateParam(int ix, string strValue);
///
/// Updates DB entities for related parameters
///
/// true when successful
bool UpdateEmbeddedDbEntity();
///
/// Creates an object copy
///
///
IParamsProvider Clone();
}
}