/// /// Copyright (c) 2013-2018 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; using System.Xml.Serialization; 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 IList 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); void UpdateEmbeddedDbEntity(); /// /// Creates an object copy /// /// IParamsProvider Clone(); } }