Newtonsoft.Json.JsonReader.ValidateEnd C# (CSharp) 메소드

ValidateEnd() 개인적인 메소드

private ValidateEnd ( JsonToken endToken ) : void
endToken JsonToken
리턴 void
        private void ValidateEnd(JsonToken endToken)
        {
            JsonContainerType currentObject = Pop();

            if (GetTypeForCloseToken(endToken) != currentObject)
            {
                throw JsonReaderException.Create(this, "JsonToken {0} is not valid for closing JsonType {1}.".FormatWith(CultureInfo.InvariantCulture, endToken, currentObject));
            }

            if (Peek() != JsonContainerType.None)
            {
                _currentState = State.PostValue;
            }
            else
            {
                SetFinished();
            }
        }