From a03f377cc6ec2815df4984986098b552d76c11fe Mon Sep 17 00:00:00 2001 From: Dave Johnston Date: Tue, 21 Nov 2023 12:52:46 +0000 Subject: [PATCH] feat: fix formatting --- .../HarnessAdapter.cs | 12 ++++++------ .../Provider.cs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/OpenFeature.Contrib.Providers.Harness/HarnessAdapter.cs b/src/OpenFeature.Contrib.Providers.Harness/HarnessAdapter.cs index ff6ae0c7..2d0e8c03 100644 --- a/src/OpenFeature.Contrib.Providers.Harness/HarnessAdapter.cs +++ b/src/OpenFeature.Contrib.Providers.Harness/HarnessAdapter.cs @@ -28,7 +28,7 @@ public static ResolutionDetails HarnessResponse(string flagKey, T defaultV flagKey, defaultValue); } - + /// /// Convert the OpenFeature EvaluationContext to a harness target. /// @@ -41,13 +41,13 @@ public static Target CreateTarget(EvaluationContext context) { return null; } - + // Get the name, if it is missing or empty return null if (context.TryGetValue("name", out var name) != true || name.IsString != true) { return null; } - + // Create a target (different targets can get different results based on rules) // TODO we need to deal with target attributes // .Attributes(new Dictionary(){{"email", "demo@harness.io"}}) @@ -56,8 +56,8 @@ public static Target CreateTarget(EvaluationContext context) .Identifier(identifier.AsString) .build(); return target; - + } - - + + } \ No newline at end of file diff --git a/src/OpenFeature.Contrib.Providers.Harness/Provider.cs b/src/OpenFeature.Contrib.Providers.Harness/Provider.cs index b59dcbec..fa2a70e3 100644 --- a/src/OpenFeature.Contrib.Providers.Harness/Provider.cs +++ b/src/OpenFeature.Contrib.Providers.Harness/Provider.cs @@ -13,9 +13,9 @@ public class Provider : FeatureProvider { private const string HarnessProviderName = "Harness Provider"; - private readonly Metadata _metadata = new (HarnessProviderName); + private readonly Metadata _metadata = new(HarnessProviderName); private readonly ICfClient _client; - + /// /// Constructor of the Harness provider. /// @@ -23,13 +23,13 @@ public Provider(ICfClient client) { _client = client; } - + /// public override Metadata GetMetadata() { return this._metadata; } - + /// public override Task> ResolveBooleanValue(string flagKey, bool defaultValue, EvaluationContext context = null) { @@ -60,7 +60,7 @@ public override Task> ResolveDoubleValue(string flagKe /// public override Task> ResolveStructureValue(string flagKey, Value defaultValue, EvaluationContext context = null) - { + { // TODO need to implement this return Task.FromResult(HarnessAdapter.HarnessResponse(flagKey, defaultValue)); }