using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.Xml.Serialization; namespace IndianHealthService.BMXNet.WinForm.Configuration { /// /// Specification for BMX RPMS Connection. Instances of this class are serialized as XML /// to a PersisentStore and are used is picklists for users to select from. /// public class RpmsConnectionSpec { [XmlIgnore] internal bool HasNameSpace { get { return this.NameSpace != null && this.NameSpace.Length > 0; } } private bool _isManageSpecsPlaceHolder = false; [XmlIgnore] internal bool IsManageSpecsPlaceHolder { get { return _isManageSpecsPlaceHolder; } set { _isManageSpecsPlaceHolder = value; } } private bool _isFromCommandLine = false; [XmlIgnore] internal bool IsFromCommandLine { get { return _isFromCommandLine; } set { _isFromCommandLine = value; } } private String _name = null; /// /// The required display name of a connection used in pick lists /// [XmlAttribute("Name")] public String Name { get { return _name; } set { _name = value; } } private String _server = null; /// /// The required Name/IP Address of the RPMS Host /// [XmlAttribute("Server")] public String Server { get { return _server; } set { _server = value; } } private int _receiveTimeout = 0; /// /// The optional time in millseconds to wait for a response from RPMS /// [XmlAttribute("ReceiveTimeout")] public int ReceiveTimeout { get { return _receiveTimeout; } set { _receiveTimeout = value; } } private int _sendTimeout = 0; /// /// The optional time in millseconds to wait when sending a request to RPMS /// [XmlAttribute("SendTimeout")] public int SendTimeout { get { return _sendTimeout; } set { _sendTimeout = value; } } private int _port = 0; /// /// The required TCP/IP port number of the RPMS BMX Broker /// [XmlAttribute("Port")] public int Port { get { return _port; } set { _port = value; } } private String _nameSpace = null; /// /// The optional Namespace to use in RPMS. Will default to BMX Brokers namespace. /// [XmlAttribute("NameSpace")] public String NameSpace { get { return _nameSpace; } set { _nameSpace = value; } } private bool _isDefault = false; /// /// The optional flag to specify this connection as the users default. /// [XmlAttribute("IsDefault")] public bool IsDefault { get { return _isDefault; } set { _isDefault = value; } } private bool _useWindowsAuthentication = false; /// /// The optional flag to specify that WindowsAuthenication should be attempted. /// [XmlAttribute("UseWindowsAuthentication")] public bool UseWindowsAuthentication { get { return _useWindowsAuthentication; } set { _useWindowsAuthentication = value; } } private bool _useDefaultNamespace = true; /// /// The optional flag to specify that the BMX Broker default namespace should be used. /// [XmlAttribute("UseDefaultNamespace")] public bool UseDefaultNamespace { get { return _useDefaultNamespace; } set { _useDefaultNamespace = value; } } } }