public virtual object OnStore(IObjectContainer container, object applicationObject
                               )
 {
     ObjectTranslatorTestCase.Thing t = (ObjectTranslatorTestCase.Thing)applicationObject;
     AddToCache(t);
     return(t.name);
 }
 public virtual void _testTranslationCount()
 {
     ObjectTranslatorTestCase.Thing t = (ObjectTranslatorTestCase.Thing)((ObjectTranslatorTestCase.Thing
                                                                          )RetrieveOnlyInstance(typeof(ObjectTranslatorTestCase.Thing)));
     Assert.IsNotNull(t);
     Assert.AreEqual("jbe", t.name);
     Assert.AreEqual(1, _trans.GetCount(t));
 }
            public virtual int GetCount(ObjectTranslatorTestCase.Thing t)
            {
                object o = (int)_countCache.Get(t.name);

                if (o == null)
                {
                    return(0);
                }
                return((int)o);
            }
            private void AddToCache(ObjectTranslatorTestCase.Thing t)
            {
                object o = (object)_countCache.Get(t.name);

                if (o == null)
                {
                    o = 0;
                }
                _countCache.Put(t.name, ((int)o) + 1);
            }