Exemplo n.º 1
0
            public void OnEvent(object sender, ObjectInfoEventArgs args
                                )
            {
                ObjectEventArgs objectArgs = args;

                updated.Add(objectArgs.Object);
            }
Exemplo n.º 2
0
        private void OnActivated(object sender, ObjectInfoEventArgs e)
        {
            Type currentType = e.Object.GetType();

            while (currentType != typeof(object))
            {
                _activations.Add(currentType, ActivationCount(currentType) + 1);
                currentType = currentType.BaseType;
            }
        }
Exemplo n.º 3
0
            public void OnEvent(object sender, ObjectInfoEventArgs args
                                )
            {
                _enclosing.AssertClientTransaction(args);
                instantiatedLog.xed = true;
                var obj             = args.Object;
                var objectReference = _enclosing.Trans().ReferenceSystem().ReferenceForObject
                                          (obj);

                Assert.IsNotNull(objectReference);
                Assert.AreSame(objectReference, args.Info);
            }
Exemplo n.º 4
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     if (doThrow.value)
     {
         if (args.Info.GetObject().GetType().Equals(typeof(Item
                                                           )))
         {
             throw new Exception();
         }
     }
 }
Exemplo n.º 5
0
            public void OnEvent(object sender, ObjectInfoEventArgs args
                                )
            {
                var obj = args.Object;

                if (!(obj is Item))
                {
                    return;
                }
                var item = (Item)obj;

                if (!item._name.Equals("foo"))
                {
                    return;
                }
                Assert.Expect(typeof(Db4oIllegalStateException), new _ICodeBlock_83(this, item));
            }
Exemplo n.º 6
0
        protected virtual void ActivateThing(object sender, ObjectInfoEventArgs args)
        {
            var thing = args.Object as IThing;

            if (thing != null)
            {
                thing.State.Clean = true;
            }
            if (args.Object is Link)
            {
                var link = (Link)args.Object;
                link.GetByID = GetById;
                //ILink<Id> idLink = (ILink<Id>)args.Object;
                //link.Leaf = GetById(idLink.Leaf);
                //link.Root = GetById(idLink.Root);
                //link.Marker = GetById(idLink.Marker);
            }
            else
            {
                CheckProxy(args.Object);
            }
        }
Exemplo n.º 7
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
 }
Exemplo n.º 8
0
 protected virtual void ThingCreated(object sender, ObjectInfoEventArgs args)
 {
     CheckProxy(args.Object);
 }
Exemplo n.º 9
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     _enclosing._updated.Increment();
 }
Exemplo n.º 10
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     _enclosing.Purge((Transaction)args.Transaction(), (int
                                                        )args.Info.GetInternalID());
 }
Exemplo n.º 11
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     deletionLog.xed = true;
     _enclosing.AssertItemIsActive(args);
 }
Exemplo n.º 12
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     _enclosing.AssertClientTransaction(args);
     activationLog.xed = true;
 }
Exemplo n.º 13
0
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     _enclosing.BindActivatableToActivator(args);
 }
 public void OnEvent(object sender, ObjectInfoEventArgs args
                     )
 {
     throw new NotImplementedException();
 }