TINKERPOP-1920 Minor refactorign of P and removed dead exceptions

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

Branch: refs/heads/TINKERPOP-1920
Commit: 75490b1dc8f0a676891e77035e18683ca2777f87
Parents: e9c31d0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 19 09:01:41 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 19 09:01:41 2018 -0400

----------------------------------------------------------------------
 gremlin-dotnet/glv/P.template                             |  4 ++--
 gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs     |  8 ++++----
 .../Gherkin/IgnoreException.cs                            | 10 +++-------
 3 files changed, 9 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75490b1d/gremlin-dotnet/glv/P.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/P.template b/gremlin-dotnet/glv/P.template
index a72c199..51f0cf7 100644
--- a/gremlin-dotnet/glv/P.template
+++ b/gremlin-dotnet/glv/P.template
@@ -94,8 +94,8 @@ namespace Gremlin.Net.Process.Traversal
 <% } %><% pmethods.findAll{ it in ["within", "without"] }.each { method -> %>
         public static P <%= toCSharpMethodName.call(method) %>(params object[] 
args)
         {
-            if (args.Length == 1 && args[0] is ICollection<object>)
-                return new P("<%= method %>", 
ToGenericArray((ICollection<object>) args[0]));
+            if (args.Length == 1 && args[0] is ICollection<object> collection)
+                return new P("without", ToGenericArray(collection));
             else
                 return new P("<%= method %>", args);
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75490b1d/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
index 11079d3..1743e05 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
@@ -154,16 +154,16 @@ namespace Gremlin.Net.Process.Traversal
 
         public static P Within(params object[] args)
         {
-            if (args.Length == 1 && args[0] is ICollection<object>)
-                return new P("within", ToGenericArray((ICollection<object>) 
args[0]));
+            if (args.Length == 1 && args[0] is ICollection<object> collection)
+                return new P("without", ToGenericArray(collection));
             else
                 return new P("within", args);
         }
 
         public static P Without(params object[] args)
         {
-            if (args.Length == 1 && args[0] is ICollection<object>)
-                return new P("without", ToGenericArray((ICollection<object>) 
args[0]));
+            if (args.Length == 1 && args[0] is ICollection<object> collection)
+                return new P("without", ToGenericArray(collection));
             else
                 return new P("without", args);
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75490b1d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 9aa5213..860c11d 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -40,11 +40,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             string reasonSuffix = null;
             switch (reason)
             {
-                case IgnoreReason.PWithinWrapsArgumentsInArray:
-                    reasonSuffix = " because P.Within() arguments are 
incorrectly wrapped in an array (TINKERPOP-1920)";
-                    break;
-                case IgnoreReason.PNotDeserializationProblem:
-                    reasonSuffix = " because P.Not() cannot be deserialized by 
Gremlin Server (TINKERPOP-1922)";
+                case IgnoreReason.NoReason:
+                    reasonSuffix = "";
                     break;
             }
             return $"Scenario ignored" + reasonSuffix;
@@ -53,7 +50,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     
     public enum IgnoreReason
     {
-        PWithinWrapsArgumentsInArray,
-        PNotDeserializationProblem
+        NoReason
     }
 }
\ No newline at end of file

Reply via email to