DynamicRest.JsonWriter.EndScope C# (CSharp) 메소드

EndScope() 공개 메소드

public EndScope ( ) : void
리턴 void
        public void EndScope()
        {
            if (_scopes.Count == 0) {
                throw new InvalidOperationException("No active scope to end.");
            }

            _writer.WriteLine();
            _writer.Indent--;

            Scope scope = _scopes.Pop();
            if (scope.Type == ScopeType.Array) {
                _writer.Write("]");
            }
            else {
                _writer.Write("}");
            }
        }