You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/09/18 16:27:39 UTC

[1/8] tinkerpop git commit: status attribute for gremlin dotnet

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1913 87ede6058 -> df5dec817


status attribute for gremlin dotnet


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ceef1763
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ceef1763
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ceef1763

Branch: refs/heads/TINKERPOP-1913
Commit: ceef1763e42f6d8eb15ff99ded58b5ddde36ca93
Parents: 87ede60
Author: Ashwini Singh <as...@gmail.com>
Authored: Mon May 14 11:42:54 2018 -0700
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:31:58 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Driver/Connection.cs        | 13 ++-
 .../src/Gremlin.Net/Driver/ResultSet.cs         | 87 ++++++++++++++++++++
 .../Driver/GremlinClientTests.cs                | 20 +++++
 3 files changed, 117 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ceef1763/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
index 279c708..3663191 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
@@ -80,6 +80,7 @@ namespace Gremlin.Net.Driver
 
         private async Task<IReadOnlyCollection<T>> ReceiveAsync<T>()
         {
+            ResultSet<T> resultSet = new ResultSet<T>();
             ResponseStatus status;
             IAggregator aggregator = null;
             var isAggregatingSideEffects = false;
@@ -114,11 +115,17 @@ namespace Gremlin.Net.Driver
                             result.Add(d);
                         }
                 }
+
+                if (status.Code == ResponseStatusCode.Success || status.Code == ResponseStatusCode.NoContent)
+                {
+                    resultSet.StatusAttributes = receivedMsg.Status.Attributes;
+                }
+
             } while (status.Code == ResponseStatusCode.PartialContent || status.Code == ResponseStatusCode.Authenticate);
 
-            if (isAggregatingSideEffects)
-                return new List<T> {(T) aggregator.GetAggregatedResult()};
-            return result;
+            resultSet.Data = isAggregatingSideEffects ? new List<T> {(T) aggregator.GetAggregatedResult()} : result;
+                
+            return resultSet;
         }
 
         private async Task AuthenticateAsync()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ceef1763/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
new file mode 100644
index 0000000..1dd4d7b
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -0,0 +1,87 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+using Gremlin.Net.Driver.Exceptions;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Gremlin.Net.Driver
+{
+    /// <summary>
+    /// Ashiwni
+    /// </summary>
+    /// <typeparam name="T"></typeparam>
+    public sealed class ResultSet<T> : IReadOnlyCollection<T>
+    {
+        /// <summary>
+        ///  Gets and Sets the read only collection
+        /// </summary>
+        public IReadOnlyCollection<T> Data { get; set; }
+
+        /// <summary>
+        /// Gets or Sets the status attributes from the gremlin response
+        /// </summary>
+        public Dictionary<string, object> StatusAttributes { get; set; }
+
+        /// <summary>Returns an enumerator that iterates through the collection.</summary>
+        /// <returns>An enumerator that can be used to iterate through the collection.</returns>
+        public IEnumerator<T> GetEnumerator()
+        {
+            return this.Data.GetEnumerator();
+        }
+
+        /// <summary>Returns an enumerator that iterates through a collection.</summary>
+        /// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return this.GetEnumerator();
+        }
+
+        /// <summary>Gets the number of elements in the collection.</summary>
+        /// <returns>The number of elements in the collection. </returns>
+        public int Count => this.Data.Count;
+    }
+
+    /// <summary>
+    /// Extension for IReadOnlyCollection 
+    /// </summary>
+    public static class ResultSetExtensions
+    {
+        /// <summary>
+        /// Casts a IReadOnlyCollection to ResultSet
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public static ResultSet<T> AsResultSet<T>(this IReadOnlyCollection<T> data)
+        {
+            if (!(data is ResultSet<T> resultSet))
+            {
+                throw new ResponseException($"IReadOnlyCollection is not of type ResultSet");
+            }
+
+            return resultSet;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ceef1763/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
index 351b83d..a7e191f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
@@ -29,6 +29,7 @@ using Gremlin.Net.Driver.Exceptions;
 using Gremlin.Net.Driver.Messages;
 using Gremlin.Net.IntegrationTest.Util;
 using Xunit;
+using Gremlin.Net.Structure.IO.GraphSON;
 
 namespace Gremlin.Net.IntegrationTest.Driver
 {
@@ -168,6 +169,25 @@ namespace Gremlin.Net.IntegrationTest.Driver
         }
 
         [Fact]
+        public async Task ShouldReturnResponseAttributes()
+        {
+            var gremlinServer = new GremlinServer(TestHost, TestPort);
+            using (var gremlinClient = new GremlinClient(gremlinServer))
+            {
+                var expectedResult = new List<int> { 1, 2, 3, 4, 5 };
+                var requestMsg = $"{nameof(expectedResult)}";
+                var bindings = new Dictionary<string, object> { { nameof(expectedResult), expectedResult } };
+
+                var response = await gremlinClient.SubmitAsync<int>(requestMsg, bindings);
+
+                var resultSet = response.AsResultSet();
+
+                Assert.NotNull(resultSet.StatusAttributes);
+
+            }
+        }
+
+        [Fact]
         public async Task ShouldThrowOnExecutionOfSimpleInvalidScript()
         {
             var gremlinServer = new GremlinServer(TestHost, TestPort);


[2/8] tinkerpop git commit: Adding comment

Posted by sp...@apache.org.
Adding comment


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/be699fc4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/be699fc4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/be699fc4

Branch: refs/heads/TINKERPOP-1913
Commit: be699fc420da263fac6a69d5f392f977cbf0d5eb
Parents: ceef176
Author: Ashwini Singh <as...@gmail.com>
Authored: Mon May 14 11:48:29 2018 -0700
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:32:56 2018 +0200

----------------------------------------------------------------------
 gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be699fc4/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
index 1dd4d7b..2b1edfb 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -28,7 +28,8 @@ using System.Collections.Generic;
 namespace Gremlin.Net.Driver
 {
     /// <summary>
-    /// Ashiwni
+    /// A ResultSet is returned from the submission of a Gremlin script to the server and represents the results provided by the server
+    /// ResultSet includes enumerable data and status attributes.
     /// </summary>
     /// <typeparam name="T"></typeparam>
     public sealed class ResultSet<T> : IReadOnlyCollection<T>


[4/8] tinkerpop git commit: Exposes ResultSet on GremlinClient. Adds StatusAttributes property on ResponseException. Removed explicit this from ResultSet to align with existing style.

Posted by sp...@apache.org.
Exposes ResultSet<T> on GremlinClient.
Adds StatusAttributes property on ResponseException.
Removed explicit this from ResultSet<T> to align with existing style.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8e456068
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8e456068
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8e456068

Branch: refs/heads/TINKERPOP-1913
Commit: 8e456068e7670fbdca057ced72baff7e02e9c255
Parents: 7d50798
Author: Patrik Husfloen <re...@redoz.com>
Authored: Wed Sep 5 23:40:57 2018 +0200
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:33:42 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Driver/Connection.cs        |  2 +-
 .../Driver/Exceptions/ResponseException.cs      | 10 ++++-
 .../src/Gremlin.Net/Driver/GremlinClient.cs     |  2 +-
 .../src/Gremlin.Net/Driver/IConnection.cs       |  2 +-
 .../src/Gremlin.Net/Driver/IGremlinClient.cs    |  4 +-
 .../Driver/Messages/ResponseStatus.cs           |  2 +-
 .../src/Gremlin.Net/Driver/ProxyConnection.cs   |  2 +-
 .../src/Gremlin.Net/Driver/ResultSet.cs         | 41 ++++----------------
 .../Driver/GremlinClientTests.cs                |  3 +-
 9 files changed, 24 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
index 5b4be20..822fc65 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
@@ -53,7 +53,7 @@ namespace Gremlin.Net.Driver
             _messageSerializer = new JsonMessageSerializer(mimeType);
         }
 
-        public async Task<IReadOnlyCollection<T>> SubmitAsync<T>(RequestMessage requestMessage)
+        public async Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage)
         {
             await SendAsync(requestMessage).ConfigureAwait(false);
             return await ReceiveAsync<T>().ConfigureAwait(false);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
index 8d26106..3c0d927 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
@@ -22,6 +22,7 @@
 #endregion
 
 using System;
+using System.Collections.Generic;
 
 namespace Gremlin.Net.Driver.Exceptions
 {
@@ -33,9 +34,16 @@ namespace Gremlin.Net.Driver.Exceptions
         /// <summary>
         ///     Initializes a new instance of the <see cref="ResponseException" /> class.
         /// </summary>
+        /// <param name="statusAttributes">The status attributes as returned by the server.</param>
         /// <param name="message">The error message string.</param>
-        public ResponseException(string message) : base(message)
+        public ResponseException(IReadOnlyDictionary<string, object> statusAttributes, string message) : base(message)
         {
+            StatusAttributes = statusAttributes;
         }
+
+        /// <summary>
+        /// Gets or sets the status attributes from the gremlin response
+        /// </summary>
+        public IReadOnlyDictionary<string, object> StatusAttributes { get; }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
index 2b47cbc..b933b37 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
@@ -68,7 +68,7 @@ namespace Gremlin.Net.Driver
         public int NrConnections => _connectionPool.NrConnections;
 
         /// <inheritdoc />
-        public async Task<IReadOnlyCollection<T>> SubmitAsync<T>(RequestMessage requestMessage)
+        public async Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage)
         {
             using (var connection = await _connectionPool.GetAvailableConnectionAsync().ConfigureAwait(false))
             {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/IConnection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/IConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/IConnection.cs
index e1651a6..b5ef52c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/IConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/IConnection.cs
@@ -30,6 +30,6 @@ namespace Gremlin.Net.Driver
 {
     internal interface IConnection : IDisposable
     {
-        Task<IReadOnlyCollection<T>> SubmitAsync<T>(RequestMessage requestMessage);
+        Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/IGremlinClient.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/IGremlinClient.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/IGremlinClient.cs
index 7a7048a..9bef4be 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/IGremlinClient.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/IGremlinClient.cs
@@ -38,11 +38,11 @@ namespace Gremlin.Net.Driver
         /// </summary>
         /// <typeparam name="T">The type of the expected results.</typeparam>
         /// <param name="requestMessage">The <see cref="RequestMessage" /> to send.</param>
-        /// <returns>A collection of the data returned from the server.</returns>
+        /// <returns>A <see cref="ResultSet{T}"/> containing the data and status attributes returned from the server.</returns>
         /// <exception cref="Exceptions.ResponseException">
         ///     Thrown when a response is received from Gremlin Server that indicates
         ///     that an error occurred.
         /// </exception>
-        Task<IReadOnlyCollection<T>> SubmitAsync<T>(RequestMessage requestMessage);
+        Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
index e3c1797..c436662 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
@@ -44,7 +44,7 @@ namespace Gremlin.Net.Driver.Messages
         public static void ThrowIfStatusIndicatesError(this ResponseStatus status)
         {
             if (status.Code.IndicatesError())
-                throw new ResponseException($"{status.Code}: {status.Message}");
+                throw new ResponseException(status.Attributes, $"{status.Code}: {status.Message}");
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/ProxyConnection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ProxyConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ProxyConnection.cs
index cbe15ec..fef6ede 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ProxyConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ProxyConnection.cs
@@ -39,7 +39,7 @@ namespace Gremlin.Net.Driver
             _releaseAction = releaseAction;
         }
 
-        public async Task<IReadOnlyCollection<T>> SubmitAsync<T>(RequestMessage requestMessage)
+        public async Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage)
         {
             return await _realConnection.SubmitAsync<T>(requestMessage).ConfigureAwait(false);
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
index 5d4a145..00a24d3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -21,7 +21,6 @@
 
 #endregion
 
-using Gremlin.Net.Driver.Exceptions;
 using System.Collections;
 using System.Collections.Generic;
 
@@ -34,24 +33,21 @@ namespace Gremlin.Net.Driver
     /// <typeparam name="T">Type of the result elements</typeparam>
     public sealed class ResultSet<T> : IReadOnlyCollection<T>
     {
-        /// <summary>
-        ///  Gets or sets the data from the response
-        /// </summary>
-        public IReadOnlyCollection<T> Data { get; }
+        private readonly IReadOnlyCollection<T> _data;
 
         /// <summary>
         /// Gets or sets the status attributes from the gremlin response
         /// </summary>
-        public Dictionary<string, object> StatusAttributes { get; }
+        public IReadOnlyDictionary<string, object> StatusAttributes { get; }
 
         /// <summary>
         /// Initializes a new instance of the ResultSet class for the specified data and status attributes.
         /// </summary>
         /// <param name="data"></param>
         /// <param name="attributes"></param>
-        public ResultSet(IReadOnlyCollection<T> data, Dictionary<string, object> attributes)
+        public ResultSet(IReadOnlyCollection<T> data, IReadOnlyDictionary<string, object> attributes)
         {
-            this.Data = data;
+            _data = data;
             this.StatusAttributes = attributes;
         }
 
@@ -59,41 +55,18 @@ namespace Gremlin.Net.Driver
         /// <returns>An enumerator that can be used to iterate through the collection.</returns>
         public IEnumerator<T> GetEnumerator()
         {
-            return this.Data.GetEnumerator();
+            return _data.GetEnumerator();
         }
 
         /// <summary>Returns an enumerator that iterates through a collection.</summary>
         /// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
         IEnumerator IEnumerable.GetEnumerator()
         {
-            return this.GetEnumerator();
+            return _data.GetEnumerator();
         }
 
         /// <summary>Gets the number of elements in the collection.</summary>
         /// <returns>The number of elements in the collection. </returns>
-        public int Count => this.Data.Count;
+        public int Count => _data.Count;
     }
-
-    /// <summary>
-    /// Extension for IReadOnlyCollection 
-    /// </summary>
-    public static class ResultSetExtensions
-    {
-        /// <summary>
-        /// Casts a IReadOnlyCollection to ResultSet
-        /// </summary>
-        /// <typeparam name="T">Type of the result elements</typeparam>
-        /// <param name="data"> result data</param>
-        /// <returns>IReadOnlyCollection as ResultSet</returns>
-        public static ResultSet<T> AsResultSet<T>(this IReadOnlyCollection<T> data)
-        {
-            if (!(data is ResultSet<T> resultSet))
-            {
-                throw new ResponseException($"IReadOnlyCollection is not of type ResultSet");
-            }
-
-            return resultSet;
-        }
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8e456068/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
index bcb76e7..6470924 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
@@ -177,9 +177,8 @@ namespace Gremlin.Net.IntegrationTest.Driver
             using (var gremlinClient = new GremlinClient(gremlinServer))
             {
                 var requestMsg = _requestMessageProvider.GetDummyMessage();
-                var response = await gremlinClient.SubmitAsync<int>(requestMsg);
+                var resultSet = await gremlinClient.SubmitAsync<int>(requestMsg);
 
-                var resultSet = response.AsResultSet();
                 Assert.NotNull(resultSet.StatusAttributes);
 
                 var values= resultSet.StatusAttributes["@value"] as JArray;


[8/8] tinkerpop git commit: Fixes incorrect usage of

Posted by sp...@apache.org.
Fixes incorrect usage of <inheritdoc />


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/df5dec81
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/df5dec81
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/df5dec81

Branch: refs/heads/TINKERPOP-1913
Commit: df5dec8178f230700076f5ffa1f8a239f615d20f
Parents: bd63772
Author: Patrik Husfloen <re...@redoz.com>
Authored: Thu Sep 13 23:58:32 2018 +0200
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 23:58:32 2018 +0200

----------------------------------------------------------------------
 gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df5dec81/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
index 62a0b3c..55a8661 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -51,19 +51,19 @@ namespace Gremlin.Net.Driver
             this.StatusAttributes = attributes;
         }
 
-        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
+        /// <inheritdoc />
         public IEnumerator<T> GetEnumerator()
         {
             return _data.GetEnumerator();
         }
 
-        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
+        /// <inheritdoc />
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _data.GetEnumerator();
         }
 
-        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
+        /// <inheritdoc />
         public int Count => _data.Count;
     }
 }


[5/8] tinkerpop git commit: Updates GremlinClientExtension to pass through ResultSet from client.

Posted by sp...@apache.org.
Updates GremlinClientExtension to pass through ResultSet<T> from client.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/159bd7a0
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/159bd7a0
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/159bd7a0

Branch: refs/heads/TINKERPOP-1913
Commit: 159bd7a023aedb477e914ff85ebe1918a34d05d2
Parents: 8e45606
Author: Patrik Husfloen <re...@redoz.com>
Authored: Thu Sep 6 23:16:56 2018 +0200
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:34:00 2018 +0200

----------------------------------------------------------------------
 gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/159bd7a0/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
index 4aad73e..1b18241 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
@@ -121,12 +121,12 @@ namespace Gremlin.Net.Driver
         /// <param name="gremlinClient">The <see cref="IGremlinClient" /> that submits the request.</param>
         /// <param name="requestScript">The Gremlin request script to send.</param>
         /// <param name="bindings">Bindings for parameters used in the requestScript.</param>
-        /// <returns>A collection of the data returned from the server.</returns>
+        /// <returns>A <see cref="ResultSet{T}"/> containing the data and status attributes returned from the server.</returns>
         /// <exception cref="Exceptions.ResponseException">
         ///     Thrown when a response is received from Gremlin Server that indicates
         ///     that an error occurred.
         /// </exception>
-        public static async Task<IReadOnlyCollection<T>> SubmitAsync<T>(this IGremlinClient gremlinClient,
+        public static async Task<ResultSet<T>> SubmitAsync<T>(this IGremlinClient gremlinClient,
             string requestScript,
             Dictionary<string, object> bindings = null)
         {


[6/8] tinkerpop git commit: Adds StatusCode (of type ResponseStatusCode) property on ResponseException.

Posted by sp...@apache.org.
Adds StatusCode (of type ResponseStatusCode) property on ResponseException.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/18046619
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/18046619
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/18046619

Branch: refs/heads/TINKERPOP-1913
Commit: 18046619a66589f879646025717520995242be4e
Parents: 159bd7a
Author: Patrik Husfloen <re...@redoz.com>
Authored: Sat Sep 8 16:54:11 2018 +0200
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:34:12 2018 +0200

----------------------------------------------------------------------
 .../Driver/Exceptions/ResponseException.cs      | 16 +++++--
 .../Driver/Messages/ResponseStatus.cs           |  2 +-
 .../Driver/Messages/ResponseStatusCode.cs       | 48 +++++++++++++++++++-
 3 files changed, 61 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18046619/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
index 3c0d927..f9020d2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
@@ -23,6 +23,7 @@
 
 using System;
 using System.Collections.Generic;
+using Gremlin.Net.Driver.Messages;
 
 namespace Gremlin.Net.Driver.Exceptions
 {
@@ -34,15 +35,24 @@ namespace Gremlin.Net.Driver.Exceptions
         /// <summary>
         ///     Initializes a new instance of the <see cref="ResponseException" /> class.
         /// </summary>
-        /// <param name="statusAttributes">The status attributes as returned by the server.</param>
+        /// <param name="statusCode">The status code returned by the server.</param>
+        /// <param name="statusAttributes">The status attributes from the gremlin response.</param>
         /// <param name="message">The error message string.</param>
-        public ResponseException(IReadOnlyDictionary<string, object> statusAttributes, string message) : base(message)
+        public ResponseException(ResponseStatusCode statusCode,
+                                 IReadOnlyDictionary<string, object> statusAttributes,
+                                 string message) : base(message)
         {
             StatusAttributes = statusAttributes;
+            StatusCode = statusCode;
         }
 
         /// <summary>
-        /// Gets or sets the status attributes from the gremlin response
+        /// Gets the status code returned from the server.
+        /// </summary>
+        public ResponseStatusCode StatusCode { get; }
+
+        /// <summary>
+        /// Gets the status attributes from the gremlin response
         /// </summary>
         public IReadOnlyDictionary<string, object> StatusAttributes { get; }
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18046619/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
index c436662..aa0b1b7 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
@@ -44,7 +44,7 @@ namespace Gremlin.Net.Driver.Messages
         public static void ThrowIfStatusIndicatesError(this ResponseStatus status)
         {
             if (status.Code.IndicatesError())
-                throw new ResponseException(status.Attributes, $"{status.Code}: {status.Message}");
+                throw new ResponseException(status.Code, status.Attributes, $"{status.Code}: {status.Message}");
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18046619/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
index 558e4f6..1c5d088 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
@@ -25,18 +25,64 @@ using System;
 
 namespace Gremlin.Net.Driver.Messages
 {
-    internal enum ResponseStatusCode
+    /// <summary>
+    /// Represents the various status codes that Gremlin Server returns.
+    /// </summary>
+    public enum ResponseStatusCode
     {
+        /// <summary>
+        /// The server successfully processed a request to completion - there are no messages remaining in this stream.
+        /// </summary>
         Success = 200,
+        
+        /// <summary>
+        /// The server processed the request but there is no result to return (e.g. an Iterator with no elements) - there are no messages remaining in this stream.
+        /// </summary>
         NoContent = 204,
+        
+        /// <summary>
+        /// The server successfully returned some content, but there is more in the stream to arrive - wait for a SUCCESS to signify the end of the stream.
+        /// </summary>
         PartialContent = 206,
+
+        /// <summary>
+        /// The request attempted to access resources that the requesting user did not have access to.
+        /// </summary>
         Unauthorized = 401,
+
+        /// <summary>
+        /// A challenge from the server for the client to authenticate its request.
+        /// </summary>
         Authenticate = 407,
+
+        /// <summary>
+        /// The request message was not properly formatted which means it could not be parsed at all or the "op" code was not recognized such that Gremlin Server could properly route it for processing. Check the message format and retry the request.
+        /// </summary>
         MalformedRequest = 498,
+
+        /// <summary>
+        /// The request message was parseable, but the arguments supplied in the message were in conflict or incomplete. Check the message format and retry the request.
+        /// </summary>
         InvalidRequestArguments = 499,
+
+        /// <summary>
+        /// A general server error occurred that prevented the request from being processed.
+        /// </summary>
         ServerError = 500,
+
+        /// <summary>
+        /// The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed. Check the script submitted for syntax errors or other problems and then resubmit.
+        /// </summary>
         ScriptEvaluationError = 597,
+
+        /// <summary>
+        /// The server exceeded one of the timeout settings for the request and could therefore only partially responded or did not respond at all.
+        /// </summary>
         ServerTimeout = 598,
+
+        /// <summary>
+        /// The server was not capable of serializing an object that was returned from the script supplied on the request. Either transform the object into something Gremlin Server can process within the script or install mapper serialization classes to Gremlin Server.
+        /// </summary>
         ServerSerializationError = 599
     }
 


[3/8] tinkerpop git commit: Addressing review comments

Posted by sp...@apache.org.
Addressing review comments


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7d507981
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7d507981
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7d507981

Branch: refs/heads/TINKERPOP-1913
Commit: 7d507981a02cb12cb1427515043504cdb154e246
Parents: be699fc
Author: Ashwini Singh <as...@gmail.com>
Authored: Wed May 16 12:14:01 2018 -0700
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 22:33:08 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Driver/Connection.cs        | 10 +++++---
 .../src/Gremlin.Net/Driver/ResultSet.cs         | 27 ++++++++++++++------
 .../Driver/GremlinClientTests.cs                | 12 ++++-----
 3 files changed, 31 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d507981/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
index 3663191..5b4be20 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
@@ -78,9 +78,10 @@ namespace Gremlin.Net.Driver
             await _webSocketConnection.SendMessageAsync(serializedMsg).ConfigureAwait(false);
         }
 
-        private async Task<IReadOnlyCollection<T>> ReceiveAsync<T>()
+        private async Task<ResultSet<T>> ReceiveAsync<T>()
         {
-            ResultSet<T> resultSet = new ResultSet<T>();
+            ResultSet<T> resultSet = null;
+            Dictionary<string, object> statusAttributes = null;
             ResponseStatus status;
             IAggregator aggregator = null;
             var isAggregatingSideEffects = false;
@@ -118,12 +119,13 @@ namespace Gremlin.Net.Driver
 
                 if (status.Code == ResponseStatusCode.Success || status.Code == ResponseStatusCode.NoContent)
                 {
-                    resultSet.StatusAttributes = receivedMsg.Status.Attributes;
+                    statusAttributes = receivedMsg.Status.Attributes;
                 }
 
             } while (status.Code == ResponseStatusCode.PartialContent || status.Code == ResponseStatusCode.Authenticate);
 
-            resultSet.Data = isAggregatingSideEffects ? new List<T> {(T) aggregator.GetAggregatedResult()} : result;
+
+            resultSet = new ResultSet<T>(isAggregatingSideEffects ? new List<T> { (T)aggregator.GetAggregatedResult() } : result, statusAttributes);
                 
             return resultSet;
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d507981/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
index 2b1edfb..5d4a145 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -31,18 +31,29 @@ namespace Gremlin.Net.Driver
     /// A ResultSet is returned from the submission of a Gremlin script to the server and represents the results provided by the server
     /// ResultSet includes enumerable data and status attributes.
     /// </summary>
-    /// <typeparam name="T"></typeparam>
+    /// <typeparam name="T">Type of the result elements</typeparam>
     public sealed class ResultSet<T> : IReadOnlyCollection<T>
     {
         /// <summary>
-        ///  Gets and Sets the read only collection
+        ///  Gets or sets the data from the response
         /// </summary>
-        public IReadOnlyCollection<T> Data { get; set; }
+        public IReadOnlyCollection<T> Data { get; }
 
         /// <summary>
-        /// Gets or Sets the status attributes from the gremlin response
+        /// Gets or sets the status attributes from the gremlin response
         /// </summary>
-        public Dictionary<string, object> StatusAttributes { get; set; }
+        public Dictionary<string, object> StatusAttributes { get; }
+
+        /// <summary>
+        /// Initializes a new instance of the ResultSet class for the specified data and status attributes.
+        /// </summary>
+        /// <param name="data"></param>
+        /// <param name="attributes"></param>
+        public ResultSet(IReadOnlyCollection<T> data, Dictionary<string, object> attributes)
+        {
+            this.Data = data;
+            this.StatusAttributes = attributes;
+        }
 
         /// <summary>Returns an enumerator that iterates through the collection.</summary>
         /// <returns>An enumerator that can be used to iterate through the collection.</returns>
@@ -71,9 +82,9 @@ namespace Gremlin.Net.Driver
         /// <summary>
         /// Casts a IReadOnlyCollection to ResultSet
         /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="data"></param>
-        /// <returns></returns>
+        /// <typeparam name="T">Type of the result elements</typeparam>
+        /// <param name="data"> result data</param>
+        /// <returns>IReadOnlyCollection as ResultSet</returns>
         public static ResultSet<T> AsResultSet<T>(this IReadOnlyCollection<T> data)
         {
             if (!(data is ResultSet<T> resultSet))

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d507981/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
index a7e191f..bcb76e7 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
@@ -30,6 +30,8 @@ using Gremlin.Net.Driver.Messages;
 using Gremlin.Net.IntegrationTest.Util;
 using Xunit;
 using Gremlin.Net.Structure.IO.GraphSON;
+using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
 
 namespace Gremlin.Net.IntegrationTest.Driver
 {
@@ -174,16 +176,14 @@ namespace Gremlin.Net.IntegrationTest.Driver
             var gremlinServer = new GremlinServer(TestHost, TestPort);
             using (var gremlinClient = new GremlinClient(gremlinServer))
             {
-                var expectedResult = new List<int> { 1, 2, 3, 4, 5 };
-                var requestMsg = $"{nameof(expectedResult)}";
-                var bindings = new Dictionary<string, object> { { nameof(expectedResult), expectedResult } };
-
-                var response = await gremlinClient.SubmitAsync<int>(requestMsg, bindings);
+                var requestMsg = _requestMessageProvider.GetDummyMessage();
+                var response = await gremlinClient.SubmitAsync<int>(requestMsg);
 
                 var resultSet = response.AsResultSet();
-
                 Assert.NotNull(resultSet.StatusAttributes);
 
+                var values= resultSet.StatusAttributes["@value"] as JArray;
+                Assert.True(values.First.ToString().Equals("host"));
             }
         }
 


[7/8] tinkerpop git commit: Tweaks xml doc comment formatting to match existing code.

Posted by sp...@apache.org.
Tweaks xml doc comment formatting to match existing code.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/bd63772c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bd63772c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bd63772c

Branch: refs/heads/TINKERPOP-1913
Commit: bd63772c2797452346a0e2b6f0a559bb0d9ff3f5
Parents: 1804661
Author: Patrik Husfloen <re...@redoz.com>
Authored: Thu Sep 13 23:39:19 2018 +0200
Committer: Patrik Husfloen <re...@redoz.com>
Committed: Thu Sep 13 23:39:19 2018 +0200

----------------------------------------------------------------------
 .../Driver/Exceptions/ResponseException.cs      |  6 ++--
 .../Driver/Messages/ResponseStatusCode.cs       | 34 +++++++++++++-------
 .../src/Gremlin.Net/Driver/ResultSet.cs         | 17 ++++------
 3 files changed, 32 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd63772c/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
index f9020d2..59ac1aa 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ResponseException.cs
@@ -42,17 +42,17 @@ namespace Gremlin.Net.Driver.Exceptions
                                  IReadOnlyDictionary<string, object> statusAttributes,
                                  string message) : base(message)
         {
-            StatusAttributes = statusAttributes;
             StatusCode = statusCode;
+            StatusAttributes = statusAttributes;
         }
 
         /// <summary>
-        /// Gets the status code returned from the server.
+        ///     Gets the status code returned from the server.
         /// </summary>
         public ResponseStatusCode StatusCode { get; }
 
         /// <summary>
-        /// Gets the status attributes from the gremlin response
+        ///     Gets the status attributes from the gremlin response
         /// </summary>
         public IReadOnlyDictionary<string, object> StatusAttributes { get; }
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd63772c/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
index 1c5d088..78f8759 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatusCode.cs
@@ -26,62 +26,72 @@ using System;
 namespace Gremlin.Net.Driver.Messages
 {
     /// <summary>
-    /// Represents the various status codes that Gremlin Server returns.
+    ///     Represents the various status codes that Gremlin Server returns.
     /// </summary>
     public enum ResponseStatusCode
     {
         /// <summary>
-        /// The server successfully processed a request to completion - there are no messages remaining in this stream.
+        ///     The server successfully processed a request to completion - there are no messages remaining in this
+        ///     stream.
         /// </summary>
         Success = 200,
         
         /// <summary>
-        /// The server processed the request but there is no result to return (e.g. an Iterator with no elements) - there are no messages remaining in this stream.
+        ///     The server processed the request but there is no result to return (e.g. an Iterator with no elements)
+        ///     - there are no messages remaining in this stream.
         /// </summary>
         NoContent = 204,
         
         /// <summary>
-        /// The server successfully returned some content, but there is more in the stream to arrive - wait for a SUCCESS to signify the end of the stream.
+        ///     The server successfully returned some content, but there is more in the stream to arrive - wait for a
+        ///     SUCCESS to signify the end of the stream.
         /// </summary>
         PartialContent = 206,
 
         /// <summary>
-        /// The request attempted to access resources that the requesting user did not have access to.
+        ///     The request attempted to access resources that the requesting user did not have access to.
         /// </summary>
         Unauthorized = 401,
 
         /// <summary>
-        /// A challenge from the server for the client to authenticate its request.
+        ///     A challenge from the server for the client to authenticate its request.
         /// </summary>
         Authenticate = 407,
 
         /// <summary>
-        /// The request message was not properly formatted which means it could not be parsed at all or the "op" code was not recognized such that Gremlin Server could properly route it for processing. Check the message format and retry the request.
+        ///     The request message was not properly formatted which means it could not be parsed at all or the "op" code
+        ///     was not recognized such that Gremlin Server could properly route it for processing. Check the message format
+        ///     and retry the request.
         /// </summary>
         MalformedRequest = 498,
 
         /// <summary>
-        /// The request message was parseable, but the arguments supplied in the message were in conflict or incomplete. Check the message format and retry the request.
+        ///     The request message was parseable, but the arguments supplied in the message were in conflict or incomplete.
+        ///     Check the message format and retry the request.
         /// </summary>
         InvalidRequestArguments = 499,
 
         /// <summary>
-        /// A general server error occurred that prevented the request from being processed.
+        ///     A general server error occurred that prevented the request from being processed.
         /// </summary>
         ServerError = 500,
 
         /// <summary>
-        /// The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed. Check the script submitted for syntax errors or other problems and then resubmit.
+        ///     The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed.
+        ///     Check the script submitted for syntax errors or other problems and then resubmit.
         /// </summary>
         ScriptEvaluationError = 597,
 
         /// <summary>
-        /// The server exceeded one of the timeout settings for the request and could therefore only partially responded or did not respond at all.
+        ///     The server exceeded one of the timeout settings for the request and could therefore only partially responded
+        ///     or did not respond at all.
         /// </summary>
         ServerTimeout = 598,
 
         /// <summary>
-        /// The server was not capable of serializing an object that was returned from the script supplied on the request. Either transform the object into something Gremlin Server can process within the script or install mapper serialization classes to Gremlin Server.
+        ///     The server was not capable of serializing an object that was returned from the script supplied on the request.
+        ///     Either transform the object into something Gremlin Server can process within the script or install mapper
+        ///     serialization classes to Gremlin Server.
         /// </summary>
         ServerSerializationError = 599
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd63772c/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
index 00a24d3..62a0b3c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResultSet.cs
@@ -27,8 +27,8 @@ using System.Collections.Generic;
 namespace Gremlin.Net.Driver
 {
     /// <summary>
-    /// A ResultSet is returned from the submission of a Gremlin script to the server and represents the results provided by the server
-    /// ResultSet includes enumerable data and status attributes.
+    ///     A ResultSet is returned from the submission of a Gremlin script to the server and represents the results
+    ///     provided by the server. ResultSet includes enumerable data and status attributes.
     /// </summary>
     /// <typeparam name="T">Type of the result elements</typeparam>
     public sealed class ResultSet<T> : IReadOnlyCollection<T>
@@ -36,12 +36,12 @@ namespace Gremlin.Net.Driver
         private readonly IReadOnlyCollection<T> _data;
 
         /// <summary>
-        /// Gets or sets the status attributes from the gremlin response
+        ///     Gets or sets the status attributes from the gremlin response
         /// </summary>
         public IReadOnlyDictionary<string, object> StatusAttributes { get; }
 
         /// <summary>
-        /// Initializes a new instance of the ResultSet class for the specified data and status attributes.
+        ///     Initializes a new instance of the ResultSet class for the specified data and status attributes.
         /// </summary>
         /// <param name="data"></param>
         /// <param name="attributes"></param>
@@ -51,22 +51,19 @@ namespace Gremlin.Net.Driver
             this.StatusAttributes = attributes;
         }
 
-        /// <summary>Returns an enumerator that iterates through the collection.</summary>
-        /// <returns>An enumerator that can be used to iterate through the collection.</returns>
+        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
         public IEnumerator<T> GetEnumerator()
         {
             return _data.GetEnumerator();
         }
 
-        /// <summary>Returns an enumerator that iterates through a collection.</summary>
-        /// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
+        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _data.GetEnumerator();
         }
 
-        /// <summary>Gets the number of elements in the collection.</summary>
-        /// <returns>The number of elements in the collection. </returns>
+        /// <inheritdoc cref="IReadOnlyCollection{T}"/>
         public int Count => _data.Count;
     }
 }