Esempio n. 1
0
        /// <summary>
        /// Method for entity class deserialization from XML file. Does not change this object content but returns another deserialized object instance
        /// </summary>
        /// <param name="pXMLFilePath">Path of the XML file to read from.</param>
        /// <returns>ImageRecords object restored from XML file</returns>
        public virtual ImageRecords DeserializeFromFile(string pXMLFilePath)
        {
            ImageRecords _result = null;

            System.Xml.Serialization.XmlSerializer seriliaser = new System.Xml.Serialization.XmlSerializer(this.GetType());
            using (System.IO.TextReader txtReader = new System.IO.StreamReader(pXMLFilePath))
            {
                _result = (ImageRecords)seriliaser.Deserialize(txtReader);
                txtReader.Close();
            }
            return(_result);
        }
Esempio n. 2
0
        /// <summary>
        /// local implementation of Equals based on unique value members
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            ImageRecords castObj = null;

            try
            {
                castObj = (ImageRecords)obj;
            }
            catch (Exception)
            {
                return(false);
            }
            return((castObj != null) && (this._id == castObj.Id));
        }
Esempio n. 3
0
 public void Add(ImageRecords pImageRecords)
 {
     _arrayInternal.Add(pImageRecords);
 }
Esempio n. 4
0
 public void Add(ImageRecords pImageRecords)
 {
     _arrayInternal.Add(pImageRecords);
 }