Arango.Client.ACollection.Rename C# (CSharp) Метод

Rename() публичный Метод

Renames specified collection.
public Rename ( string collectionName, string newCollectionName ) : object>>.AResult
collectionName string
newCollectionName string
Результат object>>.AResult
        public AResult<Dictionary<string, object>> Rename(string collectionName, string newCollectionName)
        {
            var request = new Request(HttpMethod.PUT, ApiBaseUri.Collection, "/" + collectionName + "/rename");
            var bodyDocument = new Dictionary<string, object>()
                .String(ParameterName.Name, newCollectionName);

            request.Body = JSON.ToJSON(bodyDocument, ASettings.JsonParameters);

            var response = _connection.Send(request);
            var result = new AResult<Dictionary<string, object>>(response);

            switch (response.StatusCode)
            {
                case 200:
                    var body = response.ParseBody<Dictionary<string, object>>();

                    result.Success = (body != null);
                    result.Value = body;
                    break;
                default:
                    // Arango error
                    break;
            }

            _parameters.Clear();

            return result;
        }