Habanero.BO.ObjectTreeXmlReader.ConfigureObjectAfterLoad C# (CSharp) Method

ConfigureObjectAfterLoad() protected method

Sets up the object after loading. In this case: 1. Tries to load the object from the data store. If it exists: --a. Updates the existing object's properties --b. Returns the existing object 2. Otherwise: --a. Calls the BusinessObject.AfterLoad() method on the object --b. Backs up the property values, setting the persisted values of the properties
protected ConfigureObjectAfterLoad ( IBusinessObject bo ) : IBusinessObject
bo IBusinessObject The object to configure
return IBusinessObject
        protected virtual IBusinessObject ConfigureObjectAfterLoad(IBusinessObject bo)
        {
            BusinessObjectManager.Instance.Remove(bo);
            var existingBo = TryGetUpdatedExistingBo(bo);
            if (existingBo != null) return existingBo; 
            
            ConfigureNewBo(bo);
            return bo;
        }