I have a method Modify() shown below
// Convert SortedList of objects
if (retval) //
{
// Release the database lock
Debug.Verbose(func, "Unloc");
The functionality which i want to achieve is if flag RuntimeUp true and m_reconnectInProgress false that means if(RuntimeUp && !m_reconnectInProgress) i have to do the entire procees in the Modify() method otherwise i need to return 'retval' as false .We will get retval from ClientModify(col) method also which is processed by some other side
If i put check if(RuntimeUp && !m_reconnectInProgress) on the very begginning and down side else part returning retval = false is sufficient or is there any other convenient way to do that so that we can avoid bad logic
I did above assumption based on this comment obtained"" There is no need to create the list of modified objects[col.Add(dmo);] if the RuntimeUp == false and m_reconnectInProgress ==true. You can just return false at the top of the Modify method that means You can perform these checks at the beginning of the Modify method rather than waiting until the call to ClientModify ""