Пример #1
0
        public void processInfo(DustInfoTray tray)
        {
            int kfi = kf.indexOf((DustEntity)tray.key);

            if (-1 != kfi)
            {
                object kfk = kf.keyOf(kfi);

                if (GeometryAtts.ShapePathClosed == kfk)
                {
                    ((ShapePath)tray.readerObject).closed = (bool)tray.value;
                }

                if (null != readingGeoData)
                {
                    if (null != readingCoord)
                    {
                        readingGeoData[readingCoord] = (Double)tray.value;
                        readingCoord = null;
                    }
                }
            }

            Console.WriteLine("DrawVisitor processInfo {0} = {1}", tray.key, tray.value);
        }
Пример #2
0
        public void accessImpl(DustAccessCommand op, DustInfoTray tray)
        {
            var session = getCurrentSession();

            DustDataEntity ei = (tray.entity is DustContext)
                                ? session.ctx[((DustContext)tray.entity)]
                                : (DustDataEntity)tray.entity;

            var eKey = tray.key as DustDataEntity;

            if (null == eKey)
            {
                var key = tray.key as DustKey;
                if (null != key)
                {
                    eKey = modules[key.module][key.key];
                }
            }

            switch (op)
            {
            case DustAccessCommand.read:
                tray.value = ei.getValue(eKey, tray.value, tray.dustHint);

                if ((null == tray.value) && DustUtils.isEnumRef(eKey.optValType))
                {
                    foreach (DustProcCursor drc in rootSession.cursors)
                    {
                        if ((drc.owner == ei) && (drc.key == eKey))
                        {
                            tray.value = drc.Current.eTarget;
                            return;
                        }
                    }
                }

                break;

            case DustAccessCommand.write:
                tray.value = ei.setValue(eKey, tray.value, tray.dustHint);
                break;

            case DustAccessCommand.visit:
                var vp = new DustProcVisitProcess(session, tray);
                var vt = tray as DustVisitTray;

                if (null == vt)
                {
                    vp.visitRef(ei, eKey, null, true);
                }
                else
                {
                    vp.visitEntity(null);
                }
                break;
            }
        }
        public DustProcVisitProcess(DustSession session, DustInfoTray tray)
        {
            this.session        = session;
            this.infoTray       = tray;
            this.visitTray      = tray as DustVisitTray;
            callbackTray        = (null == visitTray) ? new DustVisitTray(tray, null) : new DustVisitTray(visitTray);
            callbackTray.entity = session.resolveEntity(tray.entity);

            empty = true;

            dip = tray.value as DustInfoProcessor;
//			dif = tray.value as DustInfoFilter;
            dvp = tray.value as DustVisitor;
        }