From 07ab907a60f97036b42c77e986c1174af17eba49 Mon Sep 17 00:00:00 2001 From: Muhammad Noman Date: Thu, 16 Mar 2023 18:37:50 +0500 Subject: [PATCH] [FSSDK-8955] chore: prepare 3.11.2 branch for release (#335) * chore : updated prefix of ticket-check action (#314) (cherry picked from commit 678c6fd95ef3e27dc20267396f5cfa06ec4bb05e) * chore: Fix and Reconfigure GitHub Actions (#319) * Fix method doc for IsFeatureEnabled (#329) * [FSSDK-8938] chore: Updated newtonsoft.Json version and NjsonSchema version (#330) * [FSSDK-8955] Refac: Replaced all instances of full stack except from changelog file and code files (#331) * Replaced all instances of full stack except from changelog file and code files Co-authored-by: Griffin Cox <104227910+griffincox-optimizely@users.noreply.github.com> * [FSSDK-8955] Do not lint markdown for now * [FSSDK-8955] Remove VALIDATE_MARKDOWN --------- Co-authored-by: mnoman09 Co-authored-by: Griffin Cox <104227910+griffincox-optimizely@users.noreply.github.com> Co-authored-by: Mike Chu (cherry picked from commit 5f16357449b0fefe2e0e7ff98dfc2e9d24b8fcfa) (cherry picked from commit 887166e3272967d4142ea0836f34537f644fb483) * [FSSDK-8955] Refac: Replaced all instances of full stack from code comments and in nuspec except owner. (#332) (cherry picked from commit 2a5b19c580912a13c2da7c36ecff74cc4ab194ce) * [FSSDK-8955] chore: prepare for release 3.11.2 (#333) * [FSSDK-8955] chore: prepare for release 3.11.2 * Nit fixed --------- Co-authored-by: mnoman09 (cherry picked from commit e620c08dbb4219ae0d06dc5863f587f7071d4ea7) * updated release date to 16th March --------- Co-authored-by: Muhammad Shaharyar Co-authored-by: Mike Chu <104384559+mikechu-optimizely@users.noreply.github.com> Co-authored-by: mnoman09 --- .editorconfig | 24 +++--- .github/workflows/csharp.yml | 84 ++++++++++--------- .github/workflows/ticket_reference_check.yml | 8 +- CHANGELOG.md | 9 +- .../OptimizelySDK.DemoApp.csproj | 6 +- .../Properties/AssemblyInfo.cs | 6 +- OptimizelySDK.DemoApp/README.md | 4 +- OptimizelySDK.DemoApp/Web.config | 2 +- OptimizelySDK.DemoApp/packages.config | 2 +- .../OptimizelySDK.Net35.csproj | 4 +- .../Properties/AssemblyInfo.cs | 6 +- OptimizelySDK.Net35/packages.config | 2 +- .../OptimizelySDK.Net40.csproj | 4 +- .../Properties/AssemblyInfo.cs | 6 +- OptimizelySDK.Net40/packages.config | 2 +- .../OptimizelySDK.NetStandard16.csproj | 4 +- .../Properties/AssemblyInfo.cs | 6 +- .../OptimizelySDK.NetStandard20.csproj | 4 +- .../Properties/AssemblyInfo.cs | 6 +- OptimizelySDK.Package/OptimizelySDK.nuspec | 18 ++-- OptimizelySDK.Tests/App.config | 31 +++---- .../OptimizelySDK.Tests.csproj | 5 +- .../Properties/AssemblyInfo.cs | 6 +- OptimizelySDK/Config/DatafileProjectConfig.cs | 2 +- OptimizelySDK/Optimizely.cs | 8 +- OptimizelySDK/OptimizelySDK.csproj | 16 ++-- OptimizelySDK/ProjectConfig.cs | 2 +- OptimizelySDK/Properties/AssemblyInfo.cs | 6 +- OptimizelySDK/Utils/Validator.cs | 8 +- OptimizelySDK/packages.config | 7 +- README.md | 56 +++++++++---- .../040 - optimizelyconfig-csharp.md | 2 +- .../csharp-sdk/070 - event-batching-csharp.md | 2 +- .../csharp-sdk/190 - track-csharp.md | 2 +- 34 files changed, 200 insertions(+), 160 deletions(-) diff --git a/.editorconfig b/.editorconfig index 20fe9082..d6dfc090 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,13 +7,10 @@ root = true #### Core EditorConfig Options #### # Indentation and spacing -indent_size = 4 indent_style = space -tab_width = 4 # New line preferences -end_of_line = crlf -insert_final_newline = false +insert_final_newline = true #### .NET Coding Conventions #### @@ -198,33 +195,33 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case dotnet_naming_symbols.interface.applicable_kinds = interface dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interface.required_modifiers = +dotnet_naming_symbols.interface.required_modifiers = dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types.required_modifiers = +dotnet_naming_symbols.types.required_modifiers = dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.non_field_members.required_modifiers = +dotnet_naming_symbols.non_field_members.required_modifiers = # Naming styles -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = dotnet_naming_style.pascal_case.capitalization = pascal_case dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = dotnet_naming_style.begins_with_i.capitalization = pascal_case [*.{cs,vb}] dotnet_style_operator_placement_when_wrapping = beginning_of_line tab_width = 4 indent_size = 4 -end_of_line = crlf +end_of_line = lf dotnet_style_coalesce_expression = true:suggestion dotnet_style_null_propagation = true:suggestion dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion @@ -240,4 +237,3 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_compound_assignment = true:suggestion dotnet_style_prefer_simplified_interpolation = true:suggestion dotnet_style_namespace_match_folder = true:suggestion - diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index ba05e637..85bae292 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -6,35 +6,38 @@ on: branches: [master] pull_request: branches: [master] - + env: RELEASE_BRANCH: "master" + WINDOWS_2019_SN_PATH: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe jobs: lint_code_base: runs-on: ubuntu-latest - name: Lint Code Base + name: Lint Codebase steps: - - name: Checkout Code + - name: Checkout code uses: actions/checkout@v3 with: # Full git history is needed to get a proper list of changed files fetch-depth: 0 - - name: Lint Code Base + - name: Lint codebase uses: github/super-linter@v4 env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: master VALIDATE_CSHARP: true - VALIDATE_MARKDOWN: true integration_tests: + name: Run Integration Tests uses: optimizely/csharp-sdk/.github/workflows/integration_test.yml@master secrets: CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} - + fullstack_production_suite: + name: Run Optimizely Feature Experimentation Compatibility Suite uses: optimizely/csharp-sdk/.github/workflows/integration_test.yml@master with: FULLSTACK_TEST_REPO: ProdTesting @@ -43,7 +46,8 @@ jobs: TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} unit_test: - runs-on: ubuntu-latest + name: Build and Run Unit Tests + runs-on: windows-2019 # required version for Framework 4.0 env: REPO_SLUG: ${{ github.repository }} BUILD_NUMBER: ${{ github.run_id }} @@ -52,35 +56,40 @@ jobs: EVENT_TYPE: ${{ github.event_name }} CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - name: Restore nuget packages - run: | - nuget restore OptimizelySDK.Travis.sln - nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner - - name: script - run: | - ./install_mono.sh - xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(pwd)/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll - - name: find and sign dll + - name: Checkout code + uses: actions/checkout@v3 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1 + - name: Setup NuGet + uses: NuGet/setup-nuget@v1 + - name: Restore NuGet packages + run: nuget restore ./OptimizelySDK.Travis.sln + - name: Build solution + run: msbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(pwd)/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln + - name: Install NUnit Console + run: nuget install NUnit.Console -Version 3.15.2 -DirectDownload -OutputDirectory . + - name: Run NUnit tests + # https://docs.nunit.org/articles/nunit/running-tests/Console-Command-Line.html + run: ./NUnit.ConsoleRunner.3.15.2\tools\nunit3-console.exe /timeout 10000 /process Separate ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll + - name: Find and sign all DLLs id: unit_tests run: | - sudo find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done - - name: Check on success + Get-ChildItem -Recurse -Exclude '.*Tests.*' -Include 'OptimizelySDK*.dll' | + Where-Object { $_.DirectoryName -match '\\bin\\Release' } | + Foreach-Object { & $env:WINDOWS_2019_SN_PATH -R $_.FullName ./keypair.snk } + - name: Install AWS CLI, deploy to S3 on successful tests & for release if: steps.unit_tests.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push' env: AWS_ACCESS_KEY_ID: ${{ secrets.OFTA_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.OFTA_SECRET }} AWS_DEFAULT_REGION: ${{ secrets.OFTA_REGION }} run: | - find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (aws s3 cp $file s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/$(basename $file)-unsigned); done - + Install-Module -Name AWS.Tools.Installer -Force; + Install-AWSToolsModule AWS.Tools.S3 -Force -CleanUp; + Get-ChildItem -Recurse -Exclude '.*Tests.*' -include 'OptimizelySDK*.dll' | Where-Object { $_.DirectoryName -match '\\bin\\Release' } | Foreach-Object { aws s3 cp $_.FullName s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/$(basename $file)-unsigned } + netStandard16: + name: Build For .NET Standard 1.6 runs-on: windows-2022 env: REPO_SLUG: ${{ github.repository }} @@ -90,19 +99,17 @@ jobs: EVENT_TYPE: ${{ github.event_name }} CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: 3.1.x - name: Restore dependencies run: dotnet restore OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj - - name: Build + - name: Build and sign Standard 1.6 project id: netStandard16_build - run: | - # strongname signing is taken care of in build step - dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release - # TODO: no dotnet test yet for NetStandard16 + run: dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release - name: Check on success if: steps.netStandard16_build.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push' env: @@ -113,6 +120,7 @@ jobs: (aws s3 cp ./OptimizelySDK.NetStandard16/bin/Release/netstandard1.6/OptimizelySDK.NetStandard16.dll s3://optly-fs-travisci-artifacts/${{ env.REPO_SLUG }}/${{ env.BUILD_NUMBER }}/${{ env.RUN_NUMBER }}/${{ env.ATTEMPT_NUM }}/OptimizelySDK.NetStandard16.dll-unsigned) netStandard20: + name: Build For .NET Standard 2.0 runs-on: windows-2022 env: REPO_SLUG: ${{ github.repository }} @@ -122,19 +130,17 @@ jobs: EVENT_TYPE: ${{ github.event_name }} CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: 3.1.x - name: Restore dependencies run: dotnet restore OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj - - name: Build + - name: Build and sign Standard 2.0 project id: netStandard20_build - run: | - # strongname signing is taken care of in build step - dotnet build OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release - # TODO: no dotnet test yet for NetStandard20 + run: dotnet build OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=D:\a\csharp-sdk\csharp-sdk\keypair.snk -c Release - name: Check on success if: steps.netStandard20_build.outcome == 'success' && env.CURRENT_BRANCH == env.RELEASE_BRANCH && env.EVENT_TYPE == 'push' env: diff --git a/.github/workflows/ticket_reference_check.yml b/.github/workflows/ticket_reference_check.yml index d2829e0c..9c028cca 100644 --- a/.github/workflows/ticket_reference_check.yml +++ b/.github/workflows/ticket_reference_check.yml @@ -1,16 +1,14 @@ -name: Jira ticket reference check +name: Jira Ticket Reference Check on: pull_request: - types: [opened, edited, reopened, synchronize] + types: [opened, edited, reopened, synchronize] jobs: - jira_ticket_reference_check: runs-on: ubuntu-latest - steps: - name: Check for Jira ticket reference uses: optimizely/github-action-ticket-reference-checker-public@master with: - bodyRegex: 'OASIS-(?\d+)' + bodyRegex: 'FSSDK-(?\d+)' diff --git a/CHANGELOG.md b/CHANGELOG.md index cd48305c..b273070e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Optimizely C# SDK Changelog -## [Unreleased] + +## 3.11.2 +March 16th, 2023 + +- Update README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full Stack. ([#331](https://github.com/optimizely/csharp-sdk/pull/331), [#332](https://github.com/optimizely/csharp-sdk/pull/332)). + +### Bug Fixes +- Fix for incorrect documentation on Optimizely.IsFeatureEnabled ([#304](https://github.com/optimizely/csharp-sdk/pull/329)) ## 3.11.1 July 27th, 2022 diff --git a/OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj b/OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj index 7da4aa12..a2e34dcf 100644 --- a/OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj +++ b/OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj @@ -64,8 +64,8 @@ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll True - - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll True @@ -124,7 +124,7 @@ ..\packages\murmurhash-signed.1.0.2\lib\net45\MurmurHash.dll - ..\packages\NJsonSchema.8.30.6304.31883\lib\net45\NJsonSchema.dll + ..\packages\NJsonSchema.10.8.0\lib\net45\NJsonSchema.dll ..\packages\Optimizely.SDK.2.1.0\lib\net45\OptimizelySDK.dll diff --git a/OptimizelySDK.DemoApp/Properties/AssemblyInfo.cs b/OptimizelySDK.DemoApp/Properties/AssemblyInfo.cs index 0da2f7ba..d9323337 100644 --- a/OptimizelySDK.DemoApp/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.DemoApp/Properties/AssemblyInfo.cs @@ -37,6 +37,6 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK.DemoApp/README.md b/OptimizelySDK.DemoApp/README.md index 1e3e6b06..ccf50c72 100644 --- a/OptimizelySDK.DemoApp/README.md +++ b/OptimizelySDK.DemoApp/README.md @@ -1,6 +1,6 @@ # C# SDK Demo App -This demo uses the C# SDK, a part of Optimizely's Full Stack solution. It will walk you through: +This demo uses the C# SDK, a part of Optimizely's Feature Experimentation and Optimizely Full Stack (legacy) solution. It will walk you through: 1. How to bucket users into experiment's variation(s) 2. How to track conversion events @@ -40,7 +40,7 @@ Using the instructions below, you can run the app locally and mimic bucketing we To better understand this experiment, we recommend that you select a few different visitors on the "Select Visitor" page and bucket them into variations and simulate a conversion event by clicking the "Buy Now" button on the "Shop" page. Within a few seconds, you should see the results populate on the Optimizely results page. -The crux of this Full Stack experiment is bucketing users into variations and exposing them to different sorting functions. The SDK’s `Activate()` function will bucket users into a variation based on a user ID (internal id, user cookie, etc…). +The crux of this Optimizely Feature Experimentation experiment is bucketing users into variations and exposing them to different sorting functions. The SDK’s `Decide()` function will bucket users into a variation based on a user ID (internal id, user cookie, etc…). To actually test which sorting algorithm influences increased sales, we need to track the number of clicks on the Buy Now button. We can leverage the SDK's `Track()` function for that, passing it the event key which, in our case, is "add_to_cart" and the user ID. diff --git a/OptimizelySDK.DemoApp/Web.config b/OptimizelySDK.DemoApp/Web.config index 126c7ed9..d485ed2a 100644 --- a/OptimizelySDK.DemoApp/Web.config +++ b/OptimizelySDK.DemoApp/Web.config @@ -34,7 +34,7 @@ - + diff --git a/OptimizelySDK.DemoApp/packages.config b/OptimizelySDK.DemoApp/packages.config index 003a2ba4..6ac654c9 100644 --- a/OptimizelySDK.DemoApp/packages.config +++ b/OptimizelySDK.DemoApp/packages.config @@ -16,7 +16,7 @@ - + diff --git a/OptimizelySDK.Net35/OptimizelySDK.Net35.csproj b/OptimizelySDK.Net35/OptimizelySDK.Net35.csproj index 9d3d441d..1e34d303 100644 --- a/OptimizelySDK.Net35/OptimizelySDK.Net35.csproj +++ b/OptimizelySDK.Net35/OptimizelySDK.Net35.csproj @@ -32,8 +32,8 @@ 4 - - ..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/OptimizelySDK.Net35/Properties/AssemblyInfo.cs b/OptimizelySDK.Net35/Properties/AssemblyInfo.cs index 04609dc4..70562fb0 100644 --- a/OptimizelySDK.Net35/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.Net35/Properties/AssemblyInfo.cs @@ -38,6 +38,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK.Net35/packages.config b/OptimizelySDK.Net35/packages.config index 6655a9d2..fcf66c74 100644 --- a/OptimizelySDK.Net35/packages.config +++ b/OptimizelySDK.Net35/packages.config @@ -1,5 +1,5 @@  - + diff --git a/OptimizelySDK.Net40/OptimizelySDK.Net40.csproj b/OptimizelySDK.Net40/OptimizelySDK.Net40.csproj index 3dfdfbc9..cd28fdba 100644 --- a/OptimizelySDK.Net40/OptimizelySDK.Net40.csproj +++ b/OptimizelySDK.Net40/OptimizelySDK.Net40.csproj @@ -32,8 +32,8 @@ 4 - - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.2\lib\net40\Newtonsoft.Json.dll diff --git a/OptimizelySDK.Net40/Properties/AssemblyInfo.cs b/OptimizelySDK.Net40/Properties/AssemblyInfo.cs index 5e88f44b..8e8650f9 100644 --- a/OptimizelySDK.Net40/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.Net40/Properties/AssemblyInfo.cs @@ -38,6 +38,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK.Net40/packages.config b/OptimizelySDK.Net40/packages.config index 3c565723..719abd02 100644 --- a/OptimizelySDK.Net40/packages.config +++ b/OptimizelySDK.Net40/packages.config @@ -1,5 +1,5 @@  - + diff --git a/OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj b/OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj index 740e5d4d..d0262be3 100644 --- a/OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj +++ b/OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj @@ -155,8 +155,8 @@ - - + + diff --git a/OptimizelySDK.NetStandard16/Properties/AssemblyInfo.cs b/OptimizelySDK.NetStandard16/Properties/AssemblyInfo.cs index 8d5d9a96..ce770f39 100644 --- a/OptimizelySDK.NetStandard16/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.NetStandard16/Properties/AssemblyInfo.cs @@ -38,6 +38,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj b/OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj index 0202fe84..952ea9de 100644 --- a/OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj +++ b/OptimizelySDK.NetStandard20/OptimizelySDK.NetStandard20.csproj @@ -324,8 +324,8 @@ - - + + diff --git a/OptimizelySDK.NetStandard20/Properties/AssemblyInfo.cs b/OptimizelySDK.NetStandard20/Properties/AssemblyInfo.cs index aa920513..e1fb8759 100644 --- a/OptimizelySDK.NetStandard20/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.NetStandard20/Properties/AssemblyInfo.cs @@ -38,6 +38,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK.Package/OptimizelySDK.nuspec b/OptimizelySDK.Package/OptimizelySDK.nuspec index 891fba96..66121331 100644 --- a/OptimizelySDK.Package/OptimizelySDK.nuspec +++ b/OptimizelySDK.Package/OptimizelySDK.nuspec @@ -11,35 +11,35 @@ OptimizelySDK.png https://github.com/optimizely/csharp-sdk/blob/master/OptimizelySDK.png?raw=true false - C# SDK for Optimizely X Fullstack + C# SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts https://github.com/optimizely/csharp-sdk/blob/master/CHANGELOG.md Copyright 2017-2019 Optimizely - - + + - + - + - - + + - - + + diff --git a/OptimizelySDK.Tests/App.config b/OptimizelySDK.Tests/App.config index ba3d6873..41b1cad8 100644 --- a/OptimizelySDK.Tests/App.config +++ b/OptimizelySDK.Tests/App.config @@ -7,7 +7,7 @@
+ type="OptimizelySDK.OptimizelySDKConfigSection, OptimizelySDK" /> @@ -33,16 +33,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/OptimizelySDK.Tests/OptimizelySDK.Tests.csproj b/OptimizelySDK.Tests/OptimizelySDK.Tests.csproj index 2a776bcb..8ead9afd 100644 --- a/OptimizelySDK.Tests/OptimizelySDK.Tests.csproj +++ b/OptimizelySDK.Tests/OptimizelySDK.Tests.csproj @@ -46,9 +46,8 @@ ..\packages\Moq.4.7.1\lib\net45\Moq.dll True - - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True + + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\NUnit.2.6.4\lib\nunit.framework.dll diff --git a/OptimizelySDK.Tests/Properties/AssemblyInfo.cs b/OptimizelySDK.Tests/Properties/AssemblyInfo.cs index f38aabf1..5063610f 100644 --- a/OptimizelySDK.Tests/Properties/AssemblyInfo.cs +++ b/OptimizelySDK.Tests/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK/Config/DatafileProjectConfig.cs b/OptimizelySDK/Config/DatafileProjectConfig.cs index 93a0aceb..b214d554 100644 --- a/OptimizelySDK/Config/DatafileProjectConfig.cs +++ b/OptimizelySDK/Config/DatafileProjectConfig.cs @@ -59,7 +59,7 @@ public enum OPTLYSDKVersion public string AccountId { get; set; } /// - /// Project ID of the Full Stack project. + /// Project ID of the Optimizely Feature Experimentation project. /// public string ProjectId { get; set; } diff --git a/OptimizelySDK/Optimizely.cs b/OptimizelySDK/Optimizely.cs index cef5a68c..30f7d76a 100644 --- a/OptimizelySDK/Optimizely.cs +++ b/OptimizelySDK/Optimizely.cs @@ -111,7 +111,7 @@ public static String SDK_TYPE public bool Disposed { get; private set; } /// - /// Optimizely constructor for managing Full Stack .NET projects. + /// Optimizely constructor for managing Optimizely Feature Experimentation .NET projects. /// /// string JSON string representing the project /// EventDispatcherInterface @@ -447,8 +447,10 @@ public Variation GetForcedVariation(string experimentKey, string userId) /// The feature key /// The user ID /// The user's attributes. - /// True if feature is enabled, false or null otherwise - public virtual bool IsFeatureEnabled(string featureKey, string userId, UserAttributes userAttributes = null) + /// True if feature is enabled, otherwise false + public virtual bool IsFeatureEnabled(string featureKey, string userId, + UserAttributes userAttributes = null + ) { var config = ProjectConfigManager?.GetConfig(); diff --git a/OptimizelySDK/OptimizelySDK.csproj b/OptimizelySDK/OptimizelySDK.csproj index c8791237..55d93b0c 100644 --- a/OptimizelySDK/OptimizelySDK.csproj +++ b/OptimizelySDK/OptimizelySDK.csproj @@ -42,18 +42,22 @@ - - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True + + + ..\packages\Namotion.Reflection.2.1.0\lib\net45\Namotion.Reflection.dll - - ..\packages\NJsonSchema.8.30.6304.31883\lib\net45\NJsonSchema.dll - True + + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NJsonSchema.10.8.0\lib\net45\NJsonSchema.dll + + diff --git a/OptimizelySDK/ProjectConfig.cs b/OptimizelySDK/ProjectConfig.cs index 9a6f0701..a693bf42 100644 --- a/OptimizelySDK/ProjectConfig.cs +++ b/OptimizelySDK/ProjectConfig.cs @@ -32,7 +32,7 @@ public interface ProjectConfig string AccountId { get; set; } /// - /// Project ID of the Full Stack project. + /// Project ID of the Optimizely Feature Experimentation project. /// string ProjectId { get; set; } diff --git a/OptimizelySDK/Properties/AssemblyInfo.cs b/OptimizelySDK/Properties/AssemblyInfo.cs index 314ab5f6..9d4486bf 100644 --- a/OptimizelySDK/Properties/AssemblyInfo.cs +++ b/OptimizelySDK/Properties/AssemblyInfo.cs @@ -38,6 +38,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.11.1.0")] -[assembly: AssemblyFileVersion("3.11.1.0")] -[assembly: AssemblyInformationalVersion("3.11.1")] // Used by Nuget. +[assembly: AssemblyVersion("3.11.2.0")] +[assembly: AssemblyFileVersion("3.11.2.0")] +[assembly: AssemblyInformationalVersion("3.11.2")] // Used by Nuget. diff --git a/OptimizelySDK/Utils/Validator.cs b/OptimizelySDK/Utils/Validator.cs index fd79ca16..693cd0cd 100644 --- a/OptimizelySDK/Utils/Validator.cs +++ b/OptimizelySDK/Utils/Validator.cs @@ -37,11 +37,9 @@ public static bool ValidateJSONSchema(string configJson, string schemaJson = nul { try { - return !NJsonSchema.JsonSchema4 - .FromJsonAsync(schemaJson ?? Schema.GetSchemaJson()) - .Result - .Validate(configJson) - .Any(); + return !NJsonSchema.JsonSchema.FromJsonAsync(schemaJson ?? Schema.GetSchemaJson()). + Result.Validate(configJson). + Any(); } catch (Newtonsoft.Json.JsonReaderException) { diff --git a/OptimizelySDK/packages.config b/OptimizelySDK/packages.config index c8732913..c69d44e8 100644 --- a/OptimizelySDK/packages.config +++ b/OptimizelySDK/packages.config @@ -1,6 +1,7 @@  - - - \ No newline at end of file + + + + diff --git a/README.md b/README.md index 31cb90e0..eb0da22c 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,18 @@ [![NuGet](https://img.shields.io/nuget/v/Optimizely.SDK.svg?style=plastic)](https://www.nuget.org/packages/Optimizely.SDK/) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) -This repository houses the .Net based C# SDK for use with Optimizely Full Stack and Optimizely Rollouts. +This repository houses the .Net based C# SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy). -Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome). +Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams, letting you experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome). -Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/experimentation/v3.1.0-full-stack/docs/introduction-to-rollouts). +Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap. -## Getting Started -### Installing the SDK +## Get Started + +Refer to the [C# SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/csharp-sdk) for detailed instructions on getting started with using the SDK. + +### Install the C# SDK The SDK can be installed through [NuGet](https://www.nuget.org): @@ -30,13 +33,16 @@ Simply compile and run the Sample application to see it in use. Note that the way the Demo App stores data in memory is not recommended for production use and is merely illustrates how to use the SDK. -### Using the SDK -#### Documentation +### Feature Management Access + +To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely customer success manager. -See the Optimizely Full Stack C# SDK [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/csharp-sdk) to learn how to set up your first Full Stack project and use the SDK. +## Use the C# SDK -#### Initialization +See the Optimizely Feature Experimentation [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0-full-stack/docs/csharp-sdk) to learn how to set up your first C# project and use the SDK. + +### Initialization Create the Optimizely Client, for example: @@ -210,19 +216,39 @@ This option is used to specify whether to start the config manager on initializa This option is used to provide token for datafile belonging to a secure environment. -## Development - -### Unit tests - -The sample project contains unit tests as well which can be run from the built-in Visual Studio Test Runner. +## SDK Development ### Contributing Please see [CONTRIBUTING](CONTRIBUTING.md). -## Third Party Licenses +### Third Party Licenses Optimizely SDK uses third party software: [murmurhash-signed](https://www.nuget.org/packages/murmurhash-signed/), [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/), and [NJsonSchema](https://www.nuget.org/packages/NJsonSchema/). + +### Other Optimzely SDKs + +- Agent - https://github.com/optimizely/agent + +- Android - https://github.com/optimizely/android-sdk + +- Flutter - https://github.com/optimizely/optimizely-flutter-sdk + +- Go - https://github.com/optimizely/go-sdk + +- Java - https://github.com/optimizely/java-sdk + +- JavaScript - https://github.com/optimizely/javascript-sdk + +- PHP - https://github.com/optimizely/php-sdk + +- Python - https://github.com/optimizely/python-sdk + +- React - https://github.com/optimizely/react-sdk + +- Ruby - https://github.com/optimizely/ruby-sdk + +- Swift - https://github.com/optimizely/swift-sdk \ No newline at end of file diff --git a/docs/readme-sync/sdk-reference-guides/csharp-sdk/040 - optimizelyconfig-csharp.md b/docs/readme-sync/sdk-reference-guides/csharp-sdk/040 - optimizelyconfig-csharp.md index c9df3951..0bbda239 100644 --- a/docs/readme-sync/sdk-reference-guides/csharp-sdk/040 - optimizelyconfig-csharp.md +++ b/docs/readme-sync/sdk-reference-guides/csharp-sdk/040 - optimizelyconfig-csharp.md @@ -10,7 +10,7 @@ updatedAt: "2020-01-28T21:53:11.290Z" "title": "Overview" } [/block] -Full Stack SDKs open a well-defined set of public APIs, hiding all implementation details. However, some clients may need access to project configuration data within the "datafile". +Optimizely Feature Experimentation SDKs open a well-defined set of public APIs, hiding all implementation details. However, some clients may need access to project configuration data within the "datafile". In this document, we extend our public APIs to define data models and access methods, which clients can use to access project configuration data. diff --git a/docs/readme-sync/sdk-reference-guides/csharp-sdk/070 - event-batching-csharp.md b/docs/readme-sync/sdk-reference-guides/csharp-sdk/070 - event-batching-csharp.md index f1539996..236c2222 100644 --- a/docs/readme-sync/sdk-reference-guides/csharp-sdk/070 - event-batching-csharp.md +++ b/docs/readme-sync/sdk-reference-guides/csharp-sdk/070 - event-batching-csharp.md @@ -5,7 +5,7 @@ hidden: false createdAt: "2019-09-12T13:44:04.059Z" updatedAt: "2019-12-13T00:25:39.892Z" --- -The [Optimizely Full Stack C# SDK](https://github.com/optimizely/csharp-sdk) now batches impression and conversion events into a single payload before sending it to Optimizely. This is achieved through a new SDK component called the event processor. +The [Optimizely Feature Experimentation C# SDK](https://github.com/optimizely/csharp-sdk) now batches impression and conversion events into a single payload before sending it to Optimizely. This is achieved through a new SDK component called the event processor. Event batching has the advantage of reducing the number of outbound requests to Optimizely depending on how you define, configure, and use the event processor. It means less network traffic for the same number of Impression and conversion events tracked. diff --git a/docs/readme-sync/sdk-reference-guides/csharp-sdk/190 - track-csharp.md b/docs/readme-sync/sdk-reference-guides/csharp-sdk/190 - track-csharp.md index 37a6bf73..ae006140 100644 --- a/docs/readme-sync/sdk-reference-guides/csharp-sdk/190 - track-csharp.md +++ b/docs/readme-sync/sdk-reference-guides/csharp-sdk/190 - track-csharp.md @@ -91,7 +91,7 @@ The table lists other other Optimizely functionality that may be triggered by us "h-0": "Functionality", "h-1": "Description", "0-0": "Conversions", - "0-1": "Calling this method records a conversion and attributes it to the variations that the user has seen.\n \nFull Stack 3.x supports retroactive metrics calculation. You can create [metrics](doc:choose-metrics) on this conversion event and add metrics to experiments even after the conversion has been tracked.\n\nFor more information, see the paragraph **Events are always on** in the introduction of [Events: Tracking clicks, pageviews, and other visitor actions](https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Events%3A_Tracking_clicks%2C_pageviews%2C_and_other_visitor_actions).\n\n**Important!** \n - This method won't track events when the specified event key is invalid.\n - Changing the traffic allocation of running experiments affects how conversions are recorded and variations are attributed to users.", + "0-1": "Calling this method records a conversion and attributes it to the variations that the user has seen.\n \nOptimizely Feature Experimentation 3.x supports retroactive metrics calculation. You can create [metrics](doc:choose-metrics) on this conversion event and add metrics to experiments even after the conversion has been tracked.\n\nFor more information, see the paragraph **Events are always on** in the introduction of [Events: Tracking clicks, pageviews, and other visitor actions](https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Events%3A_Tracking_clicks%2C_pageviews%2C_and_other_visitor_actions).\n\n**Important!** \n - This method won't track events when the specified event key is invalid.\n - Changing the traffic allocation of running experiments affects how conversions are recorded and variations are attributed to users.", "1-0": "Impressions", "1-1": "Track doesn't trigger impressions.", "2-0": "Notification Listeners",