diff --git a/src/ExRam.Gremlinq.Core/AddStepHandling/AddStepHandler.cs b/src/ExRam.Gremlinq.Core/AddStepHandling/AddStepHandler.cs index 52189aaf8e..f2fb42c30f 100644 --- a/src/ExRam.Gremlinq.Core/AddStepHandling/AddStepHandler.cs +++ b/src/ExRam.Gremlinq.Core/AddStepHandling/AddStepHandler.cs @@ -31,7 +31,7 @@ public IAddStepHandler Override(Func, TStep, IGreml _dict.SetItem( typeof(TStep), TryGetAddHandler(typeof(TStep), typeof(TStep)) is Func, TStep, IGremlinQueryEnvironment, IAddStepHandler, IImmutableStack> existingAddHandler - ? (steps, step, env, baseHandler, recurse) => addStepHandler(steps, step, env, existingAddHandler, recurse) + ? (steps, step, env, _, recurse) => addStepHandler(steps, step, env, existingAddHandler, recurse) : addStepHandler)); } diff --git a/src/ExRam.Gremlinq.Core/Cache/GremlinQueryEnvironmentCache.cs b/src/ExRam.Gremlinq.Core/Cache/GremlinQueryEnvironmentCache.cs index 089dcb24d3..6225e8cbd6 100644 --- a/src/ExRam.Gremlinq.Core/Cache/GremlinQueryEnvironmentCache.cs +++ b/src/ExRam.Gremlinq.Core/Cache/GremlinQueryEnvironmentCache.cs @@ -246,7 +246,7 @@ public GremlinQueryEnvironmentCacheImpl(IGremlinQueryEnvironment environment) StringComparer.OrdinalIgnoreCase); FastNativeTypes = environment.Model.NativeTypes - .ToDictionary(x => x, x => default(object?)); + .ToDictionary(x => x, _ => default(object?)); _keyLookup = new KeyLookup(_environment.Model.PropertiesModel); } diff --git a/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs b/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs index 9d51c3525a..538f65dc54 100644 --- a/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs +++ b/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs @@ -168,7 +168,7 @@ public IGremlinQueryExecutionResultDeserializer ConfigureFragmentDeserializer(Fu : recurse.TryDeserialize(jToken, type.GetGenericArguments()[0], env) : overridden(jToken, type, env, recurse); }) - .Override((jToken, type, env, overridden, recurse) => + .Override((jToken, type, _, _, _) => { return jToken.ToObject(type); }) diff --git a/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryFragmentDeserializer.cs b/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryFragmentDeserializer.cs index 16f4f7b58d..3ece191f26 100644 --- a/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryFragmentDeserializer.cs +++ b/src/ExRam.Gremlinq.Core/Deserialization/GremlinQueryFragmentDeserializer.cs @@ -30,7 +30,7 @@ public IGremlinQueryFragmentDeserializer Override(GremlinQueryFragm _dict.SetItem( typeof(TSerialized), TryGetDeserializer(typeof(TSerialized), typeof(TSerialized)) is Func existingFragmentDeserializer - ? (fragment, type, env, baseSerializer, recurse) => deserializer(fragment, type, env, existingFragmentDeserializer, recurse) + ? (fragment, type, env, _, recurse) => deserializer(fragment, type, env, existingFragmentDeserializer, recurse) : deserializer)); } diff --git a/src/ExRam.Gremlinq.Core/Environment/GremlinQueryEnvironment.cs b/src/ExRam.Gremlinq.Core/Environment/GremlinQueryEnvironment.cs index 75d4c4e555..3dc4f16b86 100644 --- a/src/ExRam.Gremlinq.Core/Environment/GremlinQueryEnvironment.cs +++ b/src/ExRam.Gremlinq.Core/Environment/GremlinQueryEnvironment.cs @@ -107,7 +107,7 @@ public static IGremlinQueryEnvironment StoreTimeSpansAsNumbers(this IGremlinQuer return environment .ConfigureSerializer(serializer => serializer .ConfigureFragmentSerializer(fragmentSerializer => fragmentSerializer - .Override((t, env, overridden, recurse) => recurse.Serialize(t.TotalMilliseconds, env)))) + .Override((t, env, _, recurse) => recurse.Serialize(t.TotalMilliseconds, env)))) .ConfigureDeserializer(deserializer => deserializer .ConfigureFragmentDeserializer(fragmentDeserializer => fragmentDeserializer .Override((jValue, type, env, overridden, recurse) => type == typeof(TimeSpan) diff --git a/src/ExRam.Gremlinq.Core/Execution/GremlinQueryExecutor.cs b/src/ExRam.Gremlinq.Core/Execution/GremlinQueryExecutor.cs index b179cde767..880f48d0b5 100644 --- a/src/ExRam.Gremlinq.Core/Execution/GremlinQueryExecutor.cs +++ b/src/ExRam.Gremlinq.Core/Execution/GremlinQueryExecutor.cs @@ -55,11 +55,11 @@ public IAsyncEnumerable Execute(object serializedQuery, IGremlinQueryEnv } } - public static readonly IGremlinQueryExecutor Invalid = Create((query, env) => throw new InvalidOperationException($"'{nameof(IGremlinQueryExecutor.Execute)}' must not be called on {nameof(GremlinQueryExecutor)}.{nameof(Invalid)}. If you are getting this exception while executing a query, set a proper {nameof(GremlinQueryExecutor)} on the {nameof(GremlinQuerySource)} (e.g. with 'g.UseGremlinServer(...)' for GremlinServer which can be found in the 'ExRam.Gremlinq.Providers.GremlinServer' package).")); + public static readonly IGremlinQueryExecutor Invalid = Create((_, _) => throw new InvalidOperationException($"'{nameof(IGremlinQueryExecutor.Execute)}' must not be called on {nameof(GremlinQueryExecutor)}.{nameof(Invalid)}. If you are getting this exception while executing a query, set a proper {nameof(GremlinQueryExecutor)} on the {nameof(GremlinQuerySource)} (e.g. with 'g.UseGremlinServer(...)' for GremlinServer which can be found in the 'ExRam.Gremlinq.Providers.GremlinServer' package).")); - public static readonly IGremlinQueryExecutor Identity = Create((query, env) => new[] { query }.ToAsyncEnumerable()); + public static readonly IGremlinQueryExecutor Identity = Create((query, _) => new[] { query }.ToAsyncEnumerable()); - public static readonly IGremlinQueryExecutor Empty = Create((query, env) => AsyncEnumerable.Empty()); + public static readonly IGremlinQueryExecutor Empty = Create((_, _) => AsyncEnumerable.Empty()); public static IGremlinQueryExecutor Create(Func> executor) => new GremlinQueryExecutorImpl(executor); diff --git a/src/ExRam.Gremlinq.Core/Extensions/ImmutableDictionaryExtensions.cs b/src/ExRam.Gremlinq.Core/Extensions/ImmutableDictionaryExtensions.cs index e40df9909c..da9ad38b22 100644 --- a/src/ExRam.Gremlinq.Core/Extensions/ImmutableDictionaryExtensions.cs +++ b/src/ExRam.Gremlinq.Core/Extensions/ImmutableDictionaryExtensions.cs @@ -21,14 +21,14 @@ internal static IImmutableDictionary ConfigureNames( public static IImmutableDictionary UseCamelCaseNames(this IImmutableDictionary names) { - return names.ConfigureNames((member, key) => key.RawKey is string name + return names.ConfigureNames((_, key) => key.RawKey is string name ? name.ToCamelCase() : key); } public static IImmutableDictionary UseLowerCaseNames(this IImmutableDictionary names) { - return names.ConfigureNames((member, key) => key.RawKey is string name + return names.ConfigureNames((_, key) => key.RawKey is string name ? name.ToLower() : key); } diff --git a/src/ExRam.Gremlinq.Core/Models/GraphElementModel.cs b/src/ExRam.Gremlinq.Core/Models/GraphElementModel.cs index b9caca24ad..3cca1cd4dd 100644 --- a/src/ExRam.Gremlinq.Core/Models/GraphElementModel.cs +++ b/src/ExRam.Gremlinq.Core/Models/GraphElementModel.cs @@ -65,12 +65,12 @@ public static IGraphElementModel ConfigureLabels(this IGraphElementModel model, public static IGraphElementModel UseCamelCaseLabels(this IGraphElementModel model) { - return model.ConfigureLabels((type, proposedLabel) => proposedLabel.ToCamelCase()); + return model.ConfigureLabels((_, proposedLabel) => proposedLabel.ToCamelCase()); } public static IGraphElementModel UseLowerCaseLabels(this IGraphElementModel model) { - return model.ConfigureLabels((type, proposedLabel) => proposedLabel.ToLower()); + return model.ConfigureLabels((_, proposedLabel) => proposedLabel.ToLower()); } internal static ImmutableArray GetFilterLabelsOrDefault(this IGraphElementModel model, Type type, FilterLabelsVerbosity verbosity) diff --git a/src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs b/src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs index 2a6a6b46b6..92b9862c08 100644 --- a/src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs +++ b/src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs @@ -30,7 +30,7 @@ public GremlinQuerySerializerImpl(IGremlinQueryFragmentSerializer fragmentSerial _originalfragmentSerializer = fragmentSerializer; _fragmentSerializer = fragmentSerializer - .Override((stepLabel, env, @base, recurse) => + .Override((stepLabel, env, _, recurse) => { if (!_stepLabelNames!.TryGetValue(stepLabel, out var stepLabelMapping)) {