public void SetLTCValue()
        {
            IObjectFactory of         = ObjectFactory;
            ITestObject    testObject = (ITestObject)of.GetObject("testObject");
            OrderedLogicalThreadContextCheckAdvisor orderedBeforeLTCSet =
                (OrderedLogicalThreadContextCheckAdvisor)of.GetObject("orderedBeforeLTCSet");

            Assert.AreEqual(0, orderedBeforeLTCSet.CountingBeforeAdvice.GetCalls());

            Assert.IsNull(LogicalThreadContext.GetData(LogicalThreadContextAdvice.ORDERING_SLOT));
            Assert.AreEqual(4, testObject.Age, "Initial value of age for test object is not correct.");
            int newAge = 5;

            testObject.Age = newAge;
            Assert.AreEqual(1, orderedBeforeLTCSet.CountingBeforeAdvice.GetCalls());

            Assert.AreEqual(newAge, testObject.Age, "Assigned value of age for test object is not correct.");
            Assert.IsNotNull(LogicalThreadContext.GetData(LogicalThreadContextAdvice.ORDERING_SLOT));
        }
 public LTCCountingBeforeAdvice(OrderedLogicalThreadContextCheckAdvisor enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }