Exemple #1
0
        public object SaveState(ObjectRenderingContext context)
        {
            var result = _cycleDetector.GetValue(context.Assertion, k => new HashSet <object>());

            result = new HashSet <object>(result);
            return(result);
        }
Exemple #2
0
        public void RestoreState(ObjectRenderingContext context, object state)
        {
            var state2 = (object[])state;
            var idx    = 0;

            if (_cyclePreventer != null)
            {
                _cyclePreventer.RestoreState(context, state2[idx++]);
            }
            foreach (var mapping in _map)
            {
                mapping.RestoreState(context, state2[idx++]);
            }
        }
Exemple #3
0
        public object SaveState(ObjectRenderingContext context)
        {
            var cnt = _map.Count;

            if (_cyclePreventer != null)
            {
                cnt++;
            }
            var result = new object[cnt];

            var idx = 0;

            if (_cyclePreventer != null)
            {
                result[idx++] = _cyclePreventer.SaveState(context);
            }

            foreach (var mapping in _map)
            {
                result[idx++] = mapping.SaveState(context);
            }

            return(result);
        }
 public object SaveState(ObjectRenderingContext context)
 {
     return(null);
 }
 public void RestoreState(ObjectRenderingContext context, object state)
 {
 }
 public object SaveState(ObjectRenderingContext context)
 {
     return(_renderer.SaveState(context));
 }
 public void RestoreState(ObjectRenderingContext context, object state)
 {
     _renderer.RestoreState(context, state);
 }
Exemple #8
0
 public void RestoreState(ObjectRenderingContext context, object state)
 {
     _cycleDetector.AddOrUpdate(context.Assertion, (HashSet <object>)state);
 }