private bool Next() { while (true) { _currentValue = _currentValueObject.Next(); if (_currentValue == null) { if (_stack.Count == 0) { return(false); } _currentValueObject = _stack.Pop(); } else { if (_currentValue.valueType == InspectValueType.NewValue) { _stack.Push(_currentValueObject); _currentValueObject = new InspectValueObject(_currentValue.name, _currentValue.value, InspectValueState.None); } else { return(true); } } } }
private bool EndValue() { if (_stack.Count > 0) { _currentValueObject = _stack.Pop(); return(true); } return(false); }
private void BeginValue(string name, object value) { _stack.Push(_currentValueObject); //_currentValueObject = new InspectValueObject(); //_currentValueObject.name = name; //_currentValueObject.value = value; //_currentValueObject.state = InspectValueState.None; _currentValueObject = new InspectValueObject(name, value, InspectValueState.None); }
public void Init() { _depth = 0; //_currentValueObject = new InspectValueObject(); //_currentValueObject.name = _name; //_currentValueObject.value = _value; //_currentValueObject.state = InspectValueState.None; _currentValueObject = new InspectValueObject(_name, _value, InspectValueState.None); }