Ejemplo n.º 1
0
        public override void ReloadReferences()
        {
            // Do not reload references if the current object has been deleted.
            // TODO: enable when MemoryContext uses MemoryDataObjects
            //if (this.ObjectState == DataObjectState.Deleted) return;
            base.ReloadReferences();

            // fix direct object references

            if (_fk_Method.HasValue)
            {
                MethodImpl = (Zetbox.App.Base.MethodMemoryImpl)Context.Find <Zetbox.App.Base.Method>(_fk_Method.Value);
            }
            else
            {
                MethodImpl = null;
            }

            if (_fk_Property.HasValue)
            {
                PropertyImpl = (Zetbox.App.Base.PropertyMemoryImpl)Context.Find <Zetbox.App.Base.Property>(_fk_Property.Value);
            }
            else
            {
                PropertyImpl = null;
            }
        }
Ejemplo n.º 2
0
        public override void ReloadReferences()
        {
            // Do not reload references if the current object has been deleted.
            // TODO: enable when MemoryContext uses MemoryDataObjects
            //if (this.ObjectState == DataObjectState.Deleted) return;
            base.ReloadReferences();

            // fix direct object references

            if (_fk_Method.HasValue)
                MethodImpl = (Zetbox.App.Base.MethodMemoryImpl)Context.Find<Zetbox.App.Base.Method>(_fk_Method.Value);
            else
                MethodImpl = null;

            if (_fk_Property.HasValue)
                PropertyImpl = (Zetbox.App.Base.PropertyMemoryImpl)Context.Find<Zetbox.App.Base.Property>(_fk_Property.Value);
            else
                PropertyImpl = null;
        }