http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Remote/IRemoteConnection.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Remote/IRemoteConnection.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Remote/IRemoteConnection.cs deleted file mode 100644 index 8555cb3..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Remote/IRemoteConnection.cs +++ /dev/null @@ -1,42 +0,0 @@ -#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 System.Threading.Tasks; -using Gremlin.Net.Process.Traversal; - -namespace Gremlin.Net.Process.Remote -{ - /// <summary> - /// A simple abstraction of a "connection" to a "server". - /// </summary> - public interface IRemoteConnection - { - /// <summary> - /// Submits <see cref="ITraversal" /> <see cref="Bytecode" /> to a server and returns a - /// <see cref="ITraversal" />. - /// </summary> - /// <param name="bytecode">The <see cref="Bytecode" /> to send.</param> - /// <returns>The <see cref="ITraversal" /> with the results and optional side-effects.</returns> - Task<ITraversal> SubmitAsync(Bytecode bytecode); - } -} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Remote/RemoteStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Remote/RemoteStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Remote/RemoteStrategy.cs deleted file mode 100644 index 4826113..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Remote/RemoteStrategy.cs +++ /dev/null @@ -1,61 +0,0 @@ -#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 System.Threading.Tasks; -using Gremlin.Net.Process.Traversal; - -namespace Gremlin.Net.Process.Remote -{ - /// <summary> - /// Reconstructs a <see cref="ITraversal" /> by submitting it to a remote server via an - /// <see cref="IRemoteConnection" /> instance. - /// </summary> - public class RemoteStrategy : ITraversalStrategy - { - private readonly IRemoteConnection _remoteConnection; - - /// <summary> - /// Initializes a new instance of the <see cref="RemoteStrategy" /> class. - /// </summary> - /// <param name="remoteConnection">The <see cref="IRemoteConnection" /> that should be used.</param> - public RemoteStrategy(IRemoteConnection remoteConnection) - { - _remoteConnection = remoteConnection; - } - - /// <inheritdoc /> - public void Apply(ITraversal traversal) - { - ApplyAsync(traversal).Wait(); - } - - /// <inheritdoc /> - public async Task ApplyAsync(ITraversal traversal) - { - if (traversal.Traversers != null) return; - var remoteTraversal = await _remoteConnection.SubmitAsync(traversal.Bytecode).ConfigureAwait(false); - traversal.SideEffects = remoteTraversal.SideEffects; - traversal.Traversers = remoteTraversal.Traversers; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Binding.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Binding.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Binding.cs deleted file mode 100644 index 80c8269..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Binding.cs +++ /dev/null @@ -1,80 +0,0 @@ -#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 System; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// Associates a variable with a value. - /// </summary> - public class Binding : IEquatable<Binding> - { - /// <summary> - /// Initializes a new instance of the <see cref="Binding" /> class. - /// </summary> - /// <param name="key">The key that identifies the <see cref="Binding" />.</param> - /// <param name="value">The value of the <see cref="Binding" />.</param> - public Binding(string key, object value) - { - Key = key; - Value = value; - } - - /// <summary> - /// Gets the key that identifies the <see cref="Binding" />. - /// </summary> - public string Key { get; } - - /// <summary> - /// Gets the value of the <see cref="Binding" />. - /// </summary> - public object Value { get; } - - /// <inheritdoc /> - public bool Equals(Binding other) - { - if (other == null) - return false; - return Key == other.Key && Value.Equals(other.Value); - } - - /// <inheritdoc /> - public override bool Equals(object other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - if (other.GetType() != GetType()) return false; - return Equals(other as Binding); - } - - /// <inheritdoc /> - public override int GetHashCode() - { - unchecked - { - return ((Key?.GetHashCode() ?? 0) * 397) ^ (Value?.GetHashCode() ?? 0); - } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bindings.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bindings.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bindings.cs deleted file mode 100644 index 985369e..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bindings.cs +++ /dev/null @@ -1,42 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// Bindings are used to associate a variable with a value. - /// </summary> - public class Bindings - { - /// <summary> - /// Binds the variable to the specified value. - /// </summary> - /// <param name="variable">The variable to bind.</param> - /// <param name="value">The value to which the variable should be bound.</param> - /// <returns>The bound value.</returns> - public Binding Of(string variable, object value) - { - return new Binding(variable, value); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bytecode.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bytecode.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bytecode.cs deleted file mode 100644 index b35e8db..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Bytecode.cs +++ /dev/null @@ -1,85 +0,0 @@ -#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 System.Collections.Generic; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A language agnostic representation of <see cref="ITraversal" /> mutations. - /// </summary> - /// <remarks> - /// Bytecode is simply a list of ordered instructions. - /// Bytecode can be serialized between environments and machines by way of a GraphSON representation. - /// Thus, Gremlin-CSharp can create bytecode in C# and ship it to Gremlin-Java for evaluation in Java. - /// </remarks> - public class Bytecode - { - /// <summary> - /// Initializes a new instance of the <see cref="Bytecode" /> class. - /// </summary> - public Bytecode() - { - } - - /// <summary> - /// Initializes a new instance of the <see cref="Bytecode" /> class. - /// </summary> - /// <param name="byteCode">Already existing <see cref="Bytecode" /> that should be cloned.</param> - public Bytecode(Bytecode byteCode) - { - SourceInstructions = new List<Instruction>(byteCode.SourceInstructions); - StepInstructions = new List<Instruction>(byteCode.StepInstructions); - } - - /// <summary> - /// Gets the traversal source instructions. - /// </summary> - public List<Instruction> SourceInstructions { get; } = new List<Instruction>(); - - /// <summary> - /// Gets the <see cref="ITraversal" /> instructions. - /// </summary> - public List<Instruction> StepInstructions { get; } = new List<Instruction>(); - - /// <summary> - /// Add a traversal source instruction to the bytecode. - /// </summary> - /// <param name="sourceName">The traversal source method name (e.g. withSack()).</param> - /// <param name="args">The traversal source method arguments.</param> - public void AddSource(string sourceName, params object[] args) - { - SourceInstructions.Add(new Instruction(sourceName, args)); - } - - /// <summary> - /// Adds a <see cref="ITraversal" /> instruction to the bytecode. - /// </summary> - /// <param name="stepName">The traversal method name (e.g. out()).</param> - /// <param name="args">The traversal method arguments.</param> - public void AddStep(string stepName, params object[] args) - { - StepInstructions.Add(new Instruction(stepName, args)); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/DefaultTraversal.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/DefaultTraversal.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/DefaultTraversal.cs deleted file mode 100644 index 86c636c..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/DefaultTraversal.cs +++ /dev/null @@ -1,195 +0,0 @@ -#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 System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A traversal represents a directed walk over a graph. - /// </summary> - public abstract class DefaultTraversal : ITraversal - { - private IEnumerator<Traverser> _traverserEnumerator; - - /// <summary> - /// Gets the <see cref="Bytecode" /> representation of this traversal. - /// </summary> - public Bytecode Bytecode { get; protected set; } - - /// <summary> - /// Gets or sets the <see cref="ITraversalSideEffects" /> of this traversal. - /// </summary> - public ITraversalSideEffects SideEffects { get; set; } - - /// <summary> - /// Gets or sets the <see cref="Traverser" />'s of this traversal that hold the results of the traversal. - /// </summary> - public IEnumerable<Traverser> Traversers { get; set; } - - /// <summary> - /// Gets or sets the <see cref="ITraversalStrategy" /> strategies of this traversal. - /// </summary> - protected ICollection<ITraversalStrategy> TraversalStrategies { get; set; } = new List<ITraversalStrategy>(); - - private IEnumerator<Traverser> TraverserEnumerator - => _traverserEnumerator ?? (_traverserEnumerator = GetTraverserEnumerator()); - - /// <inheritdoc /> - public void Dispose() - { - Dispose(true); - } - - /// <inheritdoc /> - public bool MoveNext() - { - var currentTraverser = TraverserEnumerator.Current; - if (currentTraverser?.Bulk > 1) - { - currentTraverser.Bulk--; - return true; - } - return TraverserEnumerator.MoveNext(); - } - - /// <summary> - /// Reset is not supported. - /// </summary> - /// <exception cref="NotSupportedException">Thrown always as this operation is not supported.</exception> - public void Reset() - { - throw new NotSupportedException(); - } - - /// <inheritdoc /> - public object Current => TraverserEnumerator.Current?.Object; - - private IEnumerator<Traverser> GetTraverserEnumerator() - { - if (Traversers == null) - ApplyStrategies(); - return Traversers.GetEnumerator(); - } - - private void ApplyStrategies() - { - foreach (var strategy in TraversalStrategies) - strategy.Apply(this); - } - - private async Task ApplyStrategiesAsync() - { - foreach (var strategy in TraversalStrategies) - await strategy.ApplyAsync(this).ConfigureAwait(false); - } - - /// <summary> - /// Gets the next result from the traversal. - /// </summary> - /// <returns>The result.</returns> - public object Next() - { - MoveNext(); - return Current; - } - - /// <summary> - /// Gets the next n-number of results from the traversal. - /// </summary> - /// <param name="amount">The number of results to get.</param> - /// <returns>The n-results.</returns> - public IEnumerable<object> Next(int amount) - { - for (var i = 0; i < amount; i++) - yield return Next(); - } - - /// <summary> - /// Iterates all <see cref="Traverser" /> instances in the traversal. - /// </summary> - /// <returns>The fully drained traversal.</returns> - public ITraversal Iterate() - { - while (MoveNext()) - { - } - return this; - } - - /// <summary> - /// Gets the next <see cref="Traverser" />. - /// </summary> - /// <returns>The next <see cref="Traverser" />.</returns> - public Traverser NextTraverser() - { - TraverserEnumerator.MoveNext(); - return TraverserEnumerator.Current; - } - - /// <summary> - /// Puts all the results into a <see cref="List{T}" />. - /// </summary> - /// <returns>The results in a list.</returns> - public List<object> ToList() - { - var objs = new List<object>(); - while (MoveNext()) - objs.Add(Current); - return objs; - } - - /// <summary> - /// Puts all the results into a <see cref="HashSet{T}" />. - /// </summary> - /// <returns>The results in a set.</returns> - public HashSet<object> ToSet() - { - var objs = new HashSet<object>(); - while (MoveNext()) - objs.Add(Current); - return objs; - } - - /// <inheritdoc /> - protected virtual void Dispose(bool disposing) - { - if (disposing) - SideEffects?.Dispose(); - } - - /// <summary> - /// Starts a promise to execute a function on the current traversal that will be completed in the future. - /// </summary> - /// <typeparam name="TReturn">The return type of the <paramref name="callback" />.</typeparam> - /// <param name="callback">The function to execute on the current traversal.</param> - /// <returns>The result of the executed <paramref name="callback" />.</returns> - public async Task<TReturn> Promise<TReturn>(Func<ITraversal, TReturn> callback) - { - await ApplyStrategiesAsync().ConfigureAwait(false); - return callback(this); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversal.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversal.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversal.cs deleted file mode 100644 index cb472b7..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversal.cs +++ /dev/null @@ -1,96 +0,0 @@ -#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 System; -using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A traversal represents a directed walk over a graph. - /// </summary> - public interface ITraversal : IDisposable, IEnumerator - { - /// <summary> - /// Gets the <see cref="Bytecode" /> representation of this traversal. - /// </summary> - Bytecode Bytecode { get; } - - /// <summary> - /// Gets or sets the <see cref="ITraversalSideEffects" /> of this traversal. - /// </summary> - ITraversalSideEffects SideEffects { get; set; } - - /// <summary> - /// Gets or sets the <see cref="Traverser" />'s of this traversal that hold the results of the traversal. - /// </summary> - IEnumerable<Traverser> Traversers { get; set; } - - /// <summary> - /// Gets the next result from the traversal. - /// </summary> - /// <returns>The result.</returns> - object Next(); - - /// <summary> - /// Gets the next n-number of results from the traversal. - /// </summary> - /// <param name="amount">The number of results to get.</param> - /// <returns>The n-results.</returns> - IEnumerable<object> Next(int amount); - - /// <summary> - /// Iterates all <see cref="Traverser" /> instances in the traversal. - /// </summary> - /// <returns>The fully drained traversal.</returns> - ITraversal Iterate(); - - /// <summary> - /// Gets the next <see cref="Traverser" />. - /// </summary> - /// <returns>The next <see cref="Traverser" />.</returns> - Traverser NextTraverser(); - - /// <summary> - /// Puts all the results into a <see cref="List{T}" />. - /// </summary> - /// <returns>The results in a list.</returns> - List<object> ToList(); - - /// <summary> - /// Puts all the results into a <see cref="HashSet{T}" />. - /// </summary> - /// <returns>The results in a set.</returns> - HashSet<object> ToSet(); - - /// <summary> - /// Starts a promise to execute a function on the current traversal that will be completed in the future. - /// </summary> - /// <typeparam name="TReturn">The return type of the <paramref name="callback" />.</typeparam> - /// <param name="callback">The function to execute on the current traversal.</param> - /// <returns>The result of the executed <paramref name="callback" />.</returns> - Task<TReturn> Promise<TReturn>(Func<ITraversal, TReturn> callback); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalSideEffects.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalSideEffects.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalSideEffects.cs deleted file mode 100644 index 0378fe6..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalSideEffects.cs +++ /dev/null @@ -1,52 +0,0 @@ -#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 System; -using System.Collections.Generic; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A <see cref="ITraversal" /> can maintain global sideEffects. - /// </summary> - public interface ITraversalSideEffects : IDisposable - { - /// <summary> - /// Retrieves the keys of the side-effect that can be supplied to <see cref="Get" />. - /// </summary> - /// <returns>The keys of the side-effect.</returns> - IReadOnlyCollection<string> Keys(); - - /// <summary> - /// Gets the side-effect associated with the provided key. - /// </summary> - /// <param name="key">The key to get the value for.</param> - /// <returns>The value associated with key.</returns> - object Get(string key); - - /// <summary> - /// Invalidates the side effect cache for traversal. - /// </summary> - void Close(); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalStrategy.cs deleted file mode 100644 index 991a807..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/ITraversalStrategy.cs +++ /dev/null @@ -1,46 +0,0 @@ -#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 System.Threading.Tasks; - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A <see cref="ITraversalStrategy" /> defines a particular atomic operation for mutating a - /// <see cref="ITraversal" /> prior to its evaluation. - /// </summary> - public interface ITraversalStrategy - { - /// <summary> - /// Applies the strategy to the given <see cref="ITraversal" />. - /// </summary> - /// <param name="traversal">The <see cref="ITraversal" /> the strategy should be applied to.</param> - void Apply(ITraversal traversal); - - /// <summary> - /// Applies the strategy to the given <see cref="ITraversal" /> asynchronously. - /// </summary> - /// <param name="traversal">The <see cref="ITraversal" /> the strategy should be applied to.</param> - Task ApplyAsync(ITraversal traversal); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Instruction.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Instruction.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Instruction.cs deleted file mode 100644 index 195b7bf..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Instruction.cs +++ /dev/null @@ -1,52 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// Represents a <see cref="Bytecode" /> instruction by an operator name and its arguments. - /// </summary> - public class Instruction - { - /// <summary> - /// Initializes a new instance of the <see cref="Instruction" /> class. - /// </summary> - /// <param name="operatorName">The name of the operator.</param> - /// <param name="arguments">The arguments.</param> - public Instruction(string operatorName, params dynamic[] arguments) - { - OperatorName = operatorName; - Arguments = arguments; - } - - /// <summary> - /// Gets the name of the operator. - /// </summary> - public string OperatorName { get; } - - /// <summary> - /// Gets the arguments. - /// </summary> - public dynamic[] Arguments { get; } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/AbstractTraversalStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/AbstractTraversalStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/AbstractTraversalStrategy.cs deleted file mode 100644 index 8c9666c..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/AbstractTraversalStrategy.cs +++ /dev/null @@ -1,86 +0,0 @@ -#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 System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Gremlin.Net.Process.Traversal.Strategy -{ - /// <summary> - /// Provides a common base class for strategies that are only included in <see cref="Bytecode" /> - /// to be applied remotely. - /// </summary> - public abstract class AbstractTraversalStrategy : ITraversalStrategy, IEquatable<AbstractTraversalStrategy> - { - /// <summary> - /// Gets the name of the strategy. - /// </summary> - public string StrategyName => GetType().Name; - - /// <summary> - /// Gets the configuration of the strategy. - /// </summary> - public Dictionary<string, dynamic> Configuration { get; } = new Dictionary<string, dynamic>(); - - /// <inheritdoc /> - public bool Equals(AbstractTraversalStrategy other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return StrategyName == other.StrategyName; - } - - /// <inheritdoc /> - public virtual void Apply(ITraversal traversal) - { - } - - /// <inheritdoc /> - public virtual Task ApplyAsync(ITraversal traversal) - { - return Task.CompletedTask; - } - - /// <inheritdoc /> - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != GetType()) return false; - return Equals((AbstractTraversalStrategy) obj); - } - - /// <inheritdoc /> - public override int GetHashCode() - { - return StrategyName.GetHashCode(); - } - - /// <inheritdoc /> - public override string ToString() - { - return StrategyName; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ConnectiveStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ConnectiveStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ConnectiveStrategy.cs deleted file mode 100644 index 2bca7c2..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ConnectiveStrategy.cs +++ /dev/null @@ -1,33 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - /// <summary> - /// ConnectiveStrategy rewrites the binary conjunction form of <c>a.and().b</c> into an AndStep of - /// <c>and(a, b)</c> (likewise for OrStep). - /// </summary> - public class ConnectiveStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ElementIdStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ElementIdStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ElementIdStrategy.cs deleted file mode 100644 index 6079f58..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/ElementIdStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - /// <summary> - /// Provides a degree of control over element identifier assignment as some graphs don't provide that feature. - /// </summary> - public class ElementIdStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs deleted file mode 100644 index 98f949c..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs +++ /dev/null @@ -1,34 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - public class HaltedTraverserStrategy : AbstractTraversalStrategy - { - public HaltedTraverserStrategy(string haltedTraverserFactoryName = null) - { - if (haltedTraverserFactoryName != null) - Configuration["haltedTraverserFactory"] = haltedTraverserFactoryName; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/PartitionStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/PartitionStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/PartitionStrategy.cs deleted file mode 100644 index f89037b..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/PartitionStrategy.cs +++ /dev/null @@ -1,56 +0,0 @@ -#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 System.Collections.Generic; - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - /// <summary> - /// Partitions the vertices, edges and vertex properties of a graph into String named partitions. - /// </summary> - public class PartitionStrategy : AbstractTraversalStrategy - { - /// <summary> - /// Initializes a new instance of the <see cref="PartitionStrategy" /> class. - /// </summary> - /// <param name="partitionKey">Specifies the partition key name.</param> - /// <param name="writePartition"> - /// Specifies the name of the partition to write when adding vertices, edges and vertex - /// properties. - /// </param> - /// <param name="readPartitions">Specifies the partition of the graph to read from.</param> - /// <param name="includeMetaProperties">Set to true if vertex properties should get assigned to partitions.</param> - public PartitionStrategy(string partitionKey = null, string writePartition = null, - IEnumerable<string> readPartitions = null, bool? includeMetaProperties = null) - { - if (partitionKey != null) - Configuration["partitionKey"] = partitionKey; - if (writePartition != null) - Configuration["writePartition"] = writePartition; - if (readPartitions != null) - Configuration["readPartitions"] = readPartitions; - if (includeMetaProperties != null) - Configuration["includeMetaProperties"] = includeMetaProperties.Value; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs deleted file mode 100644 index 2f0d23e..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs +++ /dev/null @@ -1,48 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - /// <summary> - /// Provides a way to limit the view of a <see cref="ITraversal" />. - /// </summary> - public class SubgraphStrategy : AbstractTraversalStrategy - { - /// <summary> - /// Initializes a new instance of the <see cref="SubgraphStrategy" /> class. - /// </summary> - /// <param name="vertexCriterion">Constrains vertices for the <see cref="ITraversal" />.</param> - /// <param name="edgeCriterion">Constrains edges for the <see cref="ITraversal" />.</param> - /// <param name="vertexPropertyCriterion">Constrains vertex properties for the <see cref="ITraversal" />.</param> - public SubgraphStrategy(ITraversal vertexCriterion = null, ITraversal edgeCriterion = null, - ITraversal vertexPropertyCriterion = null) - { - if (vertexCriterion != null) - Configuration["vertices"] = vertexCriterion; - if (edgeCriterion != null) - Configuration["edges"] = edgeCriterion; - if (vertexPropertyCriterion != null) - Configuration["vertexProperties"] = vertexPropertyCriterion; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs deleted file mode 100644 index 1c5b5f2..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs +++ /dev/null @@ -1,50 +0,0 @@ -#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 System.Collections.Generic; -using System.Linq; - -namespace Gremlin.Net.Process.Traversal.Strategy.Decoration -{ - public class VertexProgramStrategy : AbstractTraversalStrategy - { - public VertexProgramStrategy(string graphComputer = null, int? workers = null, string persist = null, - string result = null, ITraversal vertices = null, ITraversal edges = null, - Dictionary<string, dynamic> configuration = null) - { - if (graphComputer != null) - Configuration["graphComputer"] = graphComputer; - if (workers != null) - Configuration["workers"] = workers; - if (persist != null) - Configuration["persist"] = persist; - if (result != null) - Configuration["result"] = result; - if (vertices != null) - Configuration["vertices"] = vertices; - if (edges != null) - Configuration["edges"] = edges; - configuration?.ToList().ForEach(x => Configuration[x.Key] = x.Value); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Finalization/MatchAlgorithmStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Finalization/MatchAlgorithmStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Finalization/MatchAlgorithmStrategy.cs deleted file mode 100644 index 11a9e2c..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Finalization/MatchAlgorithmStrategy.cs +++ /dev/null @@ -1,34 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Finalization -{ - public class MatchAlgorithmStrategy : AbstractTraversalStrategy - { - public MatchAlgorithmStrategy(string matchAlgorithm = null) - { - if (matchAlgorithm != null) - Configuration["matchAlgorithm"] = matchAlgorithm; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/AdjacentToIncidentStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/AdjacentToIncidentStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/AdjacentToIncidentStrategy.cs deleted file mode 100644 index bae85d7..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/AdjacentToIncidentStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Optimizes vertex- and value-emitting steps. - /// </summary> - public class AdjacentToIncidentStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/FilterRankingStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/FilterRankingStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/FilterRankingStrategy.cs deleted file mode 100644 index 3443e71..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/FilterRankingStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Reorders filter- and order-steps according to their rank. - /// </summary> - public class FilterRankingStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/GraphFilterStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/GraphFilterStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/GraphFilterStrategy.cs deleted file mode 100644 index aaaee2c..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/GraphFilterStrategy.cs +++ /dev/null @@ -1,29 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - public class GraphFilterStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IdentityRemovalStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IdentityRemovalStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IdentityRemovalStrategy.cs deleted file mode 100644 index 08a4c46..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IdentityRemovalStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Looks for <c>Identity()</c>-steps and removes them. - /// </summary> - public class IdentityRemovalStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IncidentToAdjacentStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IncidentToAdjacentStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IncidentToAdjacentStrategy.cs deleted file mode 100644 index 75b98c2..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/IncidentToAdjacentStrategy.cs +++ /dev/null @@ -1,33 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Replaces <c>.OutE().InV()</c> with <c>.Out()</c>, <c>.InE().OutV()</c> with <c>In()</c> and <c>.BothE().BothV()</c> - /// with <c>Both()</c>. - /// </summary> - public class IncidentToAdjacentStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/InlineFilterStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/InlineFilterStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/InlineFilterStrategy.cs deleted file mode 100644 index 8eade84..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/InlineFilterStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Analyzes filter-steps with child traversals that themselves are pure filters. - /// </summary> - public class InlineFilterStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/LazyBarrierStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/LazyBarrierStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/LazyBarrierStrategy.cs deleted file mode 100644 index b5cac4a..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/LazyBarrierStrategy.cs +++ /dev/null @@ -1,33 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Inserts <c>Barrier()</c>-steps into a <see cref="ITraversal" /> where appropriate in order to gain the "bulking - /// optimization". - /// </summary> - public class LazyBarrierStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/MatchPredicateStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/MatchPredicateStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/MatchPredicateStrategy.cs deleted file mode 100644 index d535963..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/MatchPredicateStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Folds any post<c>Where()</c> step that maintains a traversal constraint into <c>Match()</c>. - /// </summary> - public class MatchPredicateStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/OrderLimitStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/OrderLimitStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/OrderLimitStrategy.cs deleted file mode 100644 index 82a8df9..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/OrderLimitStrategy.cs +++ /dev/null @@ -1,29 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - public class OrderLimitStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathProcessorStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathProcessorStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathProcessorStrategy.cs deleted file mode 100644 index 2c8e106..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathProcessorStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Helps to ensure that more traversals meet the local child constraint imposed on OLAP traversals. - /// </summary> - public class PathProcessorStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathRetractionStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathRetractionStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathRetractionStrategy.cs deleted file mode 100644 index e54fbb5..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/PathRetractionStrategy.cs +++ /dev/null @@ -1,29 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - public class PathRetractionStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RangeByIsCountStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RangeByIsCountStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RangeByIsCountStrategy.cs deleted file mode 100644 index e3024bc..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RangeByIsCountStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - /// <summary> - /// Optimizes any occurrence of <c>Count()</c>-step followed by an <c>Is()</c>-step. - /// </summary> - public class RangeByIsCountStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RepeatUnrollStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RepeatUnrollStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RepeatUnrollStrategy.cs deleted file mode 100644 index 6cac454..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Optimization/RepeatUnrollStrategy.cs +++ /dev/null @@ -1,29 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Optimization -{ - public class RepeatUnrollStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/LambdaRestrictionStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/LambdaRestrictionStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/LambdaRestrictionStrategy.cs deleted file mode 100644 index 0f488ab..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/LambdaRestrictionStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Verification -{ - /// <summary> - /// Does not allow lambdas to be used in a <see cref="ITraversal" />. - /// </summary> - public class LambdaRestrictionStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/ReadOnlyStrategy.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/ReadOnlyStrategy.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/ReadOnlyStrategy.cs deleted file mode 100644 index a703e18..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Strategy/Verification/ReadOnlyStrategy.cs +++ /dev/null @@ -1,32 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal.Strategy.Verification -{ - /// <summary> - /// Detects mutating steps and throws an exception if one is found. - /// </summary> - public class ReadOnlyStrategy : AbstractTraversalStrategy - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/TraversalPredicate.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/TraversalPredicate.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/TraversalPredicate.cs deleted file mode 100644 index b854213..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/TraversalPredicate.cs +++ /dev/null @@ -1,85 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// Represents a predicate (boolean-valued function) used in a <see cref="ITraversal" />. - /// </summary> - public class TraversalPredicate - { - /// <summary> - /// Initializes a new instance of the <see cref="TraversalPredicate" /> class. - /// </summary> - /// <param name="operatorName">The name of the predicate.</param> - /// <param name="value">The value of the predicate.</param> - /// <param name="other">An optional other predicate that is used as an argument for this predicate.</param> - public TraversalPredicate(string operatorName, dynamic value, TraversalPredicate other = null) - { - OperatorName = operatorName; - Value = value; - Other = other; - } - - /// <summary> - /// Gets the name of the predicate. - /// </summary> - public string OperatorName { get; } - - /// <summary> - /// Gets the value of the predicate. - /// </summary> - public dynamic Value { get; } - - /// <summary> - /// Gets an optional other predicate that is used as an argument for this predicate. - /// </summary> - public TraversalPredicate Other { get; } - - /// <summary> - /// Returns a composed predicate that represents a logical AND of this predicate and another. - /// </summary> - /// <param name="otherPredicate">A predicate that will be logically-ANDed with this predicate.</param> - /// <returns>The composed predicate.</returns> - public TraversalPredicate And(TraversalPredicate otherPredicate) - { - return new TraversalPredicate("and", this, otherPredicate); - } - - /// <summary> - /// Returns a composed predicate that represents a logical OR of this predicate and another. - /// </summary> - /// <param name="otherPredicate">A predicate that will be logically-ORed with this predicate.</param> - /// <returns>The composed predicate.</returns> - public TraversalPredicate Or(TraversalPredicate otherPredicate) - { - return new TraversalPredicate("or", this, otherPredicate); - } - - /// <inheritdoc /> - public override string ToString() - { - return Other == null ? $"{OperatorName}({Value})" : $"{OperatorName}({Value},{Other})"; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Traverser.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Traverser.cs b/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Traverser.cs deleted file mode 100644 index 573e57f..0000000 --- a/gremlin-dotnet/src/Gremlin.Net.Process/Traversal/Traverser.cs +++ /dev/null @@ -1,75 +0,0 @@ -#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 - -namespace Gremlin.Net.Process.Traversal -{ - /// <summary> - /// A traverser represents the current state of an object flowing through a <see cref="ITraversal" />. - /// </summary> - public class Traverser - { - /// <summary> - /// Initializes a new instance of the <see cref="Traverser" /> class. - /// </summary> - /// <param name="obj">The object of the traverser.</param> - /// <param name="bulk">The number of traversers represented in this traverser.</param> - public Traverser(dynamic obj, long bulk = 1) - { - Object = obj; - Bulk = bulk; - } - - /// <summary> - /// Gets the object of this traverser. - /// </summary> - public dynamic Object { get; } - - /// <summary> - /// Gets the number of traversers represented in this traverser. - /// </summary> - public long Bulk { get; internal set; } - - /// <inheritdoc /> - public bool Equals(Traverser other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return Equals(Object, other.Object); - } - - /// <inheritdoc /> - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != GetType()) return false; - return Equals((Traverser) obj); - } - - /// <inheritdoc /> - public override int GetHashCode() - { - return Object != null ? Object.GetHashCode() : 0; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj index a909ad1..a1fc9ef 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj +++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj @@ -6,7 +6,6 @@ <Authors>Apache TinkerPop</Authors> <TargetFramework>netstandard1.3</TargetFramework> <Version>3.2.5-SNAPSHOT</Version> - <GenerateDocumentationFile>true</GenerateDocumentationFile> <AssemblyName>Gremlin.Net</AssemblyName> <PackageId>Gremlin.Net</PackageId> <PackageTags>gremlin-dotnet;gremlin;tinkerpop;tinkerpop3</PackageTags> @@ -23,6 +22,10 @@ <DocumentationFile /> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DocumentationFile /> + </PropertyGroup> + <ItemGroup> <PackageReference Include="System.Collections" Version="4.3.0" /> <PackageReference Include="System.Linq" Version="4.3.0" /> @@ -36,8 +39,4 @@ <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" /> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Gremlin.Net.Process\Gremlin.Net.Process.csproj" /> - </ItemGroup> - </Project> http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f61227bc/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs new file mode 100644 index 0000000..8555cb3 --- /dev/null +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs @@ -0,0 +1,42 @@ +#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 System.Threading.Tasks; +using Gremlin.Net.Process.Traversal; + +namespace Gremlin.Net.Process.Remote +{ + /// <summary> + /// A simple abstraction of a "connection" to a "server". + /// </summary> + public interface IRemoteConnection + { + /// <summary> + /// Submits <see cref="ITraversal" /> <see cref="Bytecode" /> to a server and returns a + /// <see cref="ITraversal" />. + /// </summary> + /// <param name="bytecode">The <see cref="Bytecode" /> to send.</param> + /// <returns>The <see cref="ITraversal" /> with the results and optional side-effects.</returns> + Task<ITraversal> SubmitAsync(Bytecode bytecode); + } +} \ No newline at end of file
