Example #1
0
        private LeftRight()
        {
            m_leftVersion  = new LeftRightVersion();
            m_rightVersion = new LeftRightVersion();


            m_innerChoice    = LeftRightChoice.Left;
            m_versionChoice  = LeftRightChoice.Left;
            m_writerLockRoot = new Object();
        }
Example #2
0
 private LeftRightVersion getLeftRightVersion(LeftRightChoice version)
 {
     return((version == LeftRightChoice.Left) ? m_leftVersion : m_rightVersion);
 }
Example #3
0
 private LeftRightVersion getWaitVersion(LeftRightChoice currentVersionChoice)
 {
     return(getLeftRightVersion(currentVersionChoice == LeftRightChoice.Left ?
                                LeftRightChoice.Right
 : LeftRightChoice.Left));
 }
Example #4
0
 private void swapInstanceVersionChoice()
 {
     m_innerChoice = (m_innerChoice == LeftRightChoice.Left) ?
                     LeftRightChoice.Right
 : LeftRightChoice.Left;
 }
Example #5
0
 private void swapLeftRightVersionChoice()
 {
     m_versionChoice = (m_versionChoice == LeftRightChoice.Left) ?
                       LeftRightChoice.Right
                : LeftRightChoice.Left;
 }