Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
b1b1562
Add variants for feature flags (#250)
amerjusupovic Sep 13, 2023
b747bb4
Adds GetFeatureNamesAsync to IVariantFeatureManager and uses the inte…
rossgrambo Oct 4, 2023
d31e505
Merges changes from main
rossgrambo Oct 5, 2023
1828686
Merge pull request #273 from microsoft/rossgrambo/preview-merge-from-…
jimmyca15 Oct 5, 2023
e7184f2
Adds telemetry pipeline (#259)
rossgrambo Oct 10, 2023
17d6202
Application Insights Publisher (#281)
rossgrambo Oct 12, 2023
aa3157e
Adds example library for Application Insights
rossgrambo Oct 13, 2023
9a4370b
Adds readme to example
rossgrambo Oct 16, 2023
886d0a9
Updates readme and persists telemetry metadata by placing it in the c…
rossgrambo Oct 17, 2023
3f14b63
Update README file for variants (#264)
amerjusupovic Oct 17, 2023
197c325
Edits to README for variants (#289)
amerjusupovic Oct 20, 2023
445458d
Simplified javascript and other slight modifications
rossgrambo Oct 20, 2023
e05591c
Adjusts IVarantManager to use ValueTask (#293)
rossgrambo Oct 25, 2023
809e6ca
resolve conflicts
zhiyuanliang-ms Oct 27, 2023
51bcf73
remove conflict mark
zhiyuanliang-ms Oct 27, 2023
195325e
Merge pull request #295 from microsoft/zhiyuanliang/preview-merge-fro…
zhiyuanliang-ms Oct 31, 2023
bb81f42
add missing comment & [Fact] attribute
zhiyuanliang-ms Nov 2, 2023
95492cc
Merge pull request #299 from microsoft/zhiyuanliang/fix-missing-comment
zhiyuanliang-ms Nov 2, 2023
2380659
Updates.
jimmyca15 Nov 7, 2023
a3d39f3
Merge branch 'preview' into user/jimmyca/appInsightsTelemetryExample
jimmyca15 Nov 7, 2023
e71d88a
Updates.
jimmyca15 Nov 7, 2023
0f39dda
Improvements.
jimmyca15 Nov 7, 2023
b88eb3a
Add missing project in sln file.
jimmyca15 Nov 7, 2023
f8e37b5
Fix various solution issues
jimmyca15 Nov 7, 2023
403d370
Remove nullable usage. Other updates.
jimmyca15 Nov 8, 2023
3ef5f34
Merge pull request #304 from jimmyca15/user/jimmyca/appInsightsTeleme…
jimmyca15 Nov 15, 2023
032cec9
resolve conflicts
zhiyuanliang-ms Nov 17, 2023
6690f76
remove & add empty line
zhiyuanliang-ms Nov 17, 2023
3f771bf
merge
zhiyuanliang-ms Nov 20, 2023
3270a02
resolve conflicts
zhiyuanliang-ms Nov 20, 2023
4b3f9f0
resolve conflicts
zhiyuanliang-ms Nov 24, 2023
5c87865
Merge branch 'preview' into user/jimmyca/fixSolution
jimmyca15 Nov 29, 2023
e91fdbd
Merge pull request #305 from jimmyca15/user/jimmyca/fixSolution
jimmyca15 Nov 30, 2023
f875901
Fix project added twice.
jimmyca15 Dec 1, 2023
91fda69
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms Dec 4, 2023
e9abe6d
use const string and feature flag referece
zhiyuanliang-ms Dec 4, 2023
f125d32
Merge pull request #326 from jimmyca15/user/jimmyca/solutionFix
jimmyca15 Dec 4, 2023
2a2e031
Add Telemetry section
jimmyca15 Dec 4, 2023
40cdae9
Made section casing consistent.
jimmyca15 Dec 4, 2023
1d6f26b
Add section for enabling telemetry on flags.
jimmyca15 Dec 4, 2023
15ff01b
Update TOC.
jimmyca15 Dec 4, 2023
e1b55c4
Use relative links.
jimmyca15 Dec 4, 2023
aabc2e8
should -> must
jimmyca15 Dec 4, 2023
0c45c27
Merge branch 'preview' into zhiyuanliang/preview-merge-from-main
zhiyuanliang-ms Dec 5, 2023
1b9e02f
Updates based on feedback. Reordered telemetry sections.
jimmyca15 Dec 7, 2023
bfb1644
Add note.
jimmyca15 Dec 7, 2023
e03226d
Update README.md
jimmyca15 Dec 8, 2023
8cdb638
Merge pull request #328 from jimmyca15/user/jimmyca/telemetryReadmeUp…
jimmyca15 Dec 8, 2023
2021de3
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms Dec 11, 2023
7c9fe57
Merge pull request #315 from microsoft/zhiyuanliang/preview-merge-fro…
zhiyuanliang-ms Dec 11, 2023
08467a3
resolve merge conflict
zhiyuanliang-ms Dec 13, 2023
9d0d968
Merge pull request #331 from microsoft/zhiyuanliang/merge-main-to-pre…
zhiyuanliang-ms Dec 18, 2023
98df1d8
Update telemetry schema in feature flags.
jimmyca15 Dec 19, 2023
bb8565d
Merges variants and isenabled paths. Adds variant reason field. (#290)
rossgrambo Dec 20, 2023
a6fb048
Merge branch 'preview' into user/jimmyca/telemetrySchema
jimmyca15 Dec 20, 2023
980f78a
Undo whitespace changes from merge.
jimmyca15 Dec 20, 2023
4580c75
Readme clarifications. Added argument exception if feature definition…
jimmyca15 Dec 20, 2023
37f2fc0
Update property summary.
jimmyca15 Dec 22, 2023
2b60d5b
Prepare packages for 4.0.0-preview release.
jimmyca15 Dec 22, 2023
94aadf1
Merge pull request #336 from jimmyca15/user/jimmyca/telemetrySchema
jimmyca15 Dec 22, 2023
8f205de
Add preview label. Update telemetry package description.
jimmyca15 Dec 28, 2023
e996adc
Merge pull request #339 from jimmyca15/user/jimmyca/previewVersionBump
jimmyca15 Dec 28, 2023
f4f2114
Bumps Application Insights version (#342)
rossgrambo Jan 2, 2024
6449974
Updates example application insights version (#344)
rossgrambo Jan 3, 2024
5cc162a
Merge pull request #345 from microsoft/preview
jimmyca15 Jan 4, 2024
2d7073a
Mention TargetingContext and fix wording in Variants section of readm…
amerjusupovic Jan 5, 2024
6a4c677
Adds TargetingContext to EvaluationEvent & Emits TargetingId in the A…
rossgrambo Jan 8, 2024
27ba646
move public method to the front of private method (#349)
zhiyuanliang-ms Jan 11, 2024
443e780
Adds extension methods for TrackEvent and TrackMetric (#348)
rossgrambo Jan 16, 2024
54cb358
Adds missing cref (#352)
rossgrambo Jan 17, 2024
3c35411
Adjusts private methods from Task to ValueTask (#353)
rossgrambo Jan 23, 2024
324ff40
Adds targeting middleware and targeting initializer (#350)
rossgrambo Jan 23, 2024
29d7d7f
resolve merge conflicts
zhiyuanliang-ms Jan 24, 2024
686851d
unify the parse methods
zhiyuanliang-ms Jan 24, 2024
4f9ec04
update
zhiyuanliang-ms Jan 24, 2024
63c9a3e
Merge branch 'main' into zhiyuanliang/merge-main-to-preview
zhiyuanliang-ms Jan 25, 2024
0cd3e5a
Merge pull request #355 from microsoft/zhiyuanliang/merge-main-to-pre…
zhiyuanliang-ms Jan 25, 2024
a853c10
Adjusts example to use middleware and initializer for targeting id (#…
rossgrambo Feb 1, 2024
f9dab5a
remove unused package
zhiyuanliang-ms Feb 2, 2024
feb624f
Merge branch 'preview' into zhiyuanliang/remove-unused-package
zhiyuanliang-ms Feb 2, 2024
8906633
Merge pull request #361 from microsoft/zhiyuanliang/remove-unused-pac…
zhiyuanliang-ms Feb 5, 2024
613380b
Feature-based Injection (#335)
zhiyuanliang-ms Feb 9, 2024
40b3ca6
adjust-tab-size (#366)
zhiyuanliang-ms Feb 9, 2024
9a7f2ff
Merge main to preview (#373)
zhiyuanliang-ms Feb 23, 2024
2183b4d
add missing param comment (#380)
zhiyuanliang-ms Mar 5, 2024
f79b3b2
Merge branch 'preview' into release/v4
rossgrambo Mar 5, 2024
d237e18
Merge pull request #381 from microsoft/rossgrambo/merge-preview-to-v4
rossgrambo Mar 6, 2024
ed64241
Version bump
rossgrambo Mar 6, 2024
2061fce
Merge pull request #383 from microsoft/rossgrambo/preview-version-bump
rossgrambo Mar 6, 2024
5c2af2c
Merge pull request #384 from microsoft/preview
rossgrambo Mar 6, 2024
7f5c095
Adds .Telemetry.ApplicationInsights.AspNetCore to build packages
rossgrambo Mar 6, 2024
7281886
Merge pull request #385 from microsoft/rossgrambo/add-ai-anc
rossgrambo Mar 6, 2024
d0c5006
Support Microsoft Feature Management schema for preview branch (#375)
zhiyuanliang-ms Mar 10, 2024
c95e755
update (#398)
zhiyuanliang-ms Mar 14, 2024
0b5aff1
Optional Cancellation Token (#395)
zhiyuanliang-ms Mar 18, 2024
529a981
resolve conflicts
zhiyuanliang-ms Mar 20, 2024
31cbcd6
Merge pull request #406 from microsoft/zhiyuanliang/merge-main-to-pre…
zhiyuanliang-ms Mar 20, 2024
5971473
Update README to mention the usage of feature-based injection (varian…
zhiyuanliang-ms Mar 21, 2024
09faf8d
Avoid redundant validation for cached TargetingFilterSettings (#387)
zhiyuanliang-ms Mar 28, 2024
526b364
Update target framework for telemetry packages (#413)
zhiyuanliang-ms Apr 2, 2024
00bb4f9
Adjusts namespace to simply ~.Telemetry
rossgrambo Apr 4, 2024
8ac41a8
Adjusts ApplicationInsights extension methods namespace
rossgrambo Apr 4, 2024
d17f9b9
Adjusts class name of TelemetryClientExceptions
rossgrambo Apr 5, 2024
038883c
Removed changes to FM.Telemetry.ApplicationInsights.AspNetCore namespace
rossgrambo Apr 5, 2024
75d4f4b
Merge pull request #418 from microsoft/rossgrambo/appinsights-extensi…
rossgrambo Apr 5, 2024
dd0c9e3
Merge pull request #417 from microsoft/rossgrambo/namespace-update
rossgrambo Apr 5, 2024
cd5cfcb
Ensure the consistency of targeting evaluation across CPU architectur…
zhiyuanliang-ms Apr 7, 2024
5319701
version bump (#420)
zhiyuanliang-ms Apr 9, 2024
e219d06
Merge branch 'release/v4' into preview
zhiyuanliang-ms Apr 9, 2024
b925d69
Move warning deeper into variant code
rossgrambo Apr 11, 2024
8f0e5e3
Adjusted warning message
rossgrambo Apr 11, 2024
bba4f38
Boolean zen
rossgrambo Apr 12, 2024
cd9c7c8
Updating from comments
rossgrambo Apr 15, 2024
7e0b3a6
Adjusted wording
rossgrambo Apr 15, 2024
db139aa
Formatting update
rossgrambo Apr 15, 2024
c141e1a
Merge pull request #426 from microsoft/rossgrambo/warning-log-missing…
rossgrambo Apr 15, 2024
bdc99d7
Promote Microsoft FM schema in README (#414)
zhiyuanliang-ms Apr 22, 2024
1ecab0d
Remove variant & telemetry support for .NET Feature Management schema…
zhiyuanliang-ms Apr 22, 2024
c95995e
add dependency for telemetry aspnetcore package (#439)
zhiyuanliang-ms Apr 29, 2024
d9ff1af
Support variant for FeatureTagHelper (#407)
zhiyuanliang-ms May 19, 2024
31764aa
Moves telemetry publishing to Activity
rossgrambo May 30, 2024
91aba75
Update src/Microsoft.FeatureManagement/FeatureManager.cs
rossgrambo May 31, 2024
8d7abcf
Update src/Microsoft.FeatureManagement/FeatureManager.cs
rossgrambo May 31, 2024
2580625
Resolving comments
rossgrambo May 31, 2024
d90fa76
avoid null reference (#457)
zhiyuanliang-ms Jun 1, 2024
512721f
Some formatting updates
rossgrambo Jun 11, 2024
f654715
Adjusted exception & exception message
rossgrambo Jun 11, 2024
7cd5aa3
Update src/Microsoft.FeatureManagement/FeatureManager.cs
rossgrambo Jun 11, 2024
9e68841
Adjusts hosted service to use the ServiceProvider instead of manually…
rossgrambo Jun 11, 2024
9b6eb53
Update src/Microsoft.FeatureManagement/FeatureManager.cs
rossgrambo Jun 12, 2024
81f6b2f
resolve merge conflict
zhiyuanliang-ms Jun 17, 2024
4250726
Resolving comments
rossgrambo Jun 19, 2024
62bbd17
Merge branch 'rossgrambo-activity-based-telemetry' of https://github.…
rossgrambo Jun 19, 2024
f669d09
Moved conditional checks
rossgrambo Jun 19, 2024
dbd6738
Switched to standard null checks
rossgrambo Jun 19, 2024
cdf5ac3
Adjusted to use activity parent instead of thread check and adjusted …
rossgrambo Jun 19, 2024
4579aef
Updated string null check
rossgrambo Jun 19, 2024
1143722
Merge pull request #455 from microsoft/rossgrambo-activity-based-tele…
rossgrambo Jun 19, 2024
2118472
Updates activity event to be PascalCase
rossgrambo Jun 19, 2024
114989a
update example name
zhiyuanliang-ms Jun 20, 2024
cf50c96
resolve conflict
zhiyuanliang-ms Jun 20, 2024
63fa95e
resolve merge conflict
zhiyuanliang-ms Jun 20, 2024
948cb4a
Merge pull request #461 from microsoft/zhiyuanliang/merge-main-to-pre…
zhiyuanliang-ms Jun 20, 2024
1a06766
Update Variant Example Application (#437)
zhiyuanliang-ms Jun 20, 2024
392e370
Merge pull request #464 from microsoft/rossgrambo-activity-event-naming
rossgrambo Jun 20, 2024
64c6e60
Switches to Activity for storing TargetingId and removes Microsoft.Fe…
rossgrambo Jun 20, 2024
956c99a
Removes Microsoft.FeatureManagement.Telemetry.ApplicationInsights.Asp…
rossgrambo Jun 27, 2024
ca04dd3
Adds null check in middleware
rossgrambo Jun 27, 2024
4d61d15
Added debug logs for unexpected nulls
rossgrambo Jul 3, 2024
c8deb66
Merge pull request #467 from microsoft/rossgrambo/activity-based-targ…
rossgrambo Jul 5, 2024
b5e3a4f
Respect .NET and Microsoft feature management schemas in configuratio…
zhiyuanliang-ms Jul 10, 2024
7681f37
Switching log from debug to warning (#471)
rossgrambo Jul 16, 2024
8b470cc
resolve merge conflict
zhiyuanliang-ms Jul 17, 2024
98ed704
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms Jul 18, 2024
7557b1d
adjust spacing
zhiyuanliang-ms Jul 18, 2024
b29b86b
Merge pull request #473 from microsoft/zhiyuanliang/merge-main-to-pre…
zhiyuanliang-ms Jul 18, 2024
54e2213
version bump 4.0.0-preview4 (#476)
zhiyuanliang-ms Jul 18, 2024
d069049
fix typo in comment (#480)
zhiyuanliang-ms Jul 23, 2024
2ae7e61
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
amerjusupovic Jul 25, 2024
84d86c6
Merge pull request #482 from microsoft/merge-main-to-preview
amerjusupovic Jul 25, 2024
882c7b7
Adjusts builder extension methods to be friendlier (#487)
rossgrambo Aug 23, 2024
9284d27
Use ITargetingContext when calling GetVariantAsync (#484)
zhiyuanliang-ms Aug 26, 2024
400796d
remove configuration reference from variant feature flag (#488)
zhiyuanliang-ms Aug 27, 2024
9732c8f
Renames and updates EvaluationDataToAppInsights example (#490)
rossgrambo Sep 4, 2024
564312d
For examples and tests- fixes warnings, updates packages, and updates…
rossgrambo Sep 4, 2024
79a31dd
use TimeProvider (#452) (#492)
rossgrambo Sep 9, 2024
f1c5755
Merge branch 'main' into preview
rossgrambo Sep 9, 2024
0b4f473
Removes preview (#493)
rossgrambo Sep 10, 2024
4b32a1a
Removes unused using statements and cleans up spacing. (#496)
rossgrambo Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions Microsoft.FeatureManagement.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{FB
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.FeatureManagement.AspNetCore", "tests\Tests.FeatureManagement.AspNetCore\Tests.FeatureManagement.AspNetCore.csproj", "{FC0DC3E2-5646-4AEC-A7DB-2D6167BC3BB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "examples\ConsoleApp\ConsoleApp.csproj", "{7B98D293-F270-423E-A9A6-0D388E903AE9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "examples\ConsoleApp\ConsoleApp.csproj", "{7B98D293-F270-423E-A9A6-0D388E903AE9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorPages", "examples\RazorPages\RazorPages.csproj", "{36DBB413-D9CA-4C56-AE5B-EAEA4C344DB3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPages", "examples\RazorPages\RazorPages.csproj", "{36DBB413-D9CA-4C56-AE5B-EAEA4C344DB3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FeatureFlagDemo", "examples\FeatureFlagDemo\FeatureFlagDemo.csproj", "{DACAB624-4611-42E8-844C-529F93A54980}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FeatureFlagDemo", "examples\FeatureFlagDemo\FeatureFlagDemo.csproj", "{DACAB624-4611-42E8-844C-529F93A54980}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TargetingConsoleApp", "examples\TargetingConsoleApp\TargetingConsoleApp.csproj", "{283D3EBB-4716-4F1D-BA51-A435F7E2AB82}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TargetingConsoleApp", "examples\TargetingConsoleApp\TargetingConsoleApp.csproj", "{283D3EBB-4716-4F1D-BA51-A435F7E2AB82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorServerApp", "examples\BlazorServerApp\BlazorServerApp.csproj", "{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FeatureManagement.Telemetry.ApplicationInsights", "src\Microsoft.FeatureManagement.Telemetry.ApplicationInsights\Microsoft.FeatureManagement.Telemetry.ApplicationInsights.csproj", "{7964DC66-B2D3-412D-B18A-86D1E07D149D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VariantAndTelemetryDemo", "examples\VariantAndTelemetryDemo\VariantAndTelemetryDemo.csproj", "{1502529E-47E9-4306-98C4-BF6CF7C7C275}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServerApp", "examples\BlazorServerApp\BlazorServerApp.csproj", "{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VariantServiceDemo", "examples\VariantServiceDemo\VariantServiceDemo.csproj", "{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -63,10 +69,22 @@ Global
{283D3EBB-4716-4F1D-BA51-A435F7E2AB82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{283D3EBB-4716-4F1D-BA51-A435F7E2AB82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{283D3EBB-4716-4F1D-BA51-A435F7E2AB82}.Release|Any CPU.Build.0 = Release|Any CPU
{7964DC66-B2D3-412D-B18A-86D1E07D149D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7964DC66-B2D3-412D-B18A-86D1E07D149D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7964DC66-B2D3-412D-B18A-86D1E07D149D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7964DC66-B2D3-412D-B18A-86D1E07D149D}.Release|Any CPU.Build.0 = Release|Any CPU
{1502529E-47E9-4306-98C4-BF6CF7C7C275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1502529E-47E9-4306-98C4-BF6CF7C7C275}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1502529E-47E9-4306-98C4-BF6CF7C7C275}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1502529E-47E9-4306-98C4-BF6CF7C7C275}.Release|Any CPU.Build.0 = Release|Any CPU
{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E}.Release|Any CPU.Build.0 = Release|Any CPU
{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -78,7 +96,9 @@ Global
{36DBB413-D9CA-4C56-AE5B-EAEA4C344DB3} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
{DACAB624-4611-42E8-844C-529F93A54980} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
{283D3EBB-4716-4F1D-BA51-A435F7E2AB82} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
{1502529E-47E9-4306-98C4-BF6CF7C7C275} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
{12BAB5A6-4EEB-4917-B5D9-4AFB6253008E} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
{E8E17CB9-434E-4386-BF96-FA53BBFDCD6F} = {FB5C34DF-695C-4DF9-8AED-B3EA2516EA72}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {84DA6C54-F140-4518-A1B4-E4CF42117FBD}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Feature management provides a way to develop and expose application functionalit
* [ASP.NET Core Web App (Razor Page)](./examples/RazorPages)
* [ASP.NET Core Web App (MVC)](./examples/FeatureFlagDemo)
* [Blazor Server App](./examples/BlazorServerApp)
* [ASP.NET Core Web App with Variants and Telemetry](./examples/VariantAndTelemetryDemo)
* [ASP.NET Core Web App with Variant Service](./examples/VariantServiceDemo)

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions examples/BlazorServerApp/BlazorServerApp.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.FeatureManagement\Microsoft.FeatureManagement.csproj" />
</ItemGroup>
Expand Down
53 changes: 32 additions & 21 deletions examples/BlazorServerApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,44 @@ This app demonstrates how to use the Feature Management library in Blazor apps.
This app uses two feature flags: "BrowserEnhancement" and "Beta".

``` json
"FeatureManagement": {
"BrowserEnhancement": {
"EnabledFor": [
{
"Name": "Browser",
"Parameters": {
"AllowedBrowsers": [ "Edge" ]
}
"feature_management": {
"feature_flags": [
{
"id": "BrowserEnhancement",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Browser",
"parameters": {
"AllowedBrowsers": [ "Edge" ]
}
}
]
}
},
"Beta": {
"EnabledFor": [
{
"Name": "Targeting",
"Parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
}
}
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
}
}
}
}
]
}
}
]
}
```

Expand All @@ -65,6 +75,7 @@ This app uses [cookie authentication](https://learn.microsoft.com/en-us/aspnet/c
Rather than `HttpContext`, the [`AuthenticationStateProvider`](https://learn.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-8.0#authenticationstateprovider-service) service is used to obtain the user authentication state information for setting targeting context. The details can be found in the [`MyTargetingContextAccessor`](./MyTargetingContextAccessor.cs).

## Service Registration

Blazor applications like this one typically pull ambient contextual data from scoped services. For example, the `UserAgentContext`, `AuthenticationStateProvider` and `ITargetingContextAccessor` are all scoped services. This pattern *breaks* if the feature management services are added as singleton, which is typical in non-blazor web apps.

In Blazor, *avoid* the following
Expand Down
58 changes: 34 additions & 24 deletions examples/BlazorServerApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,43 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"BrowserEnhancement": {
"EnabledFor": [
{
"Name": "Browser",
"Parameters": {
"AllowedBrowsers": [ "Edge" ]
}
"feature_management": {
"feature_flags": [
{
"id": "BrowserEnhancement",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Browser",
"parameters": {
"AllowedBrowsers": [ "Edge" ]
}
}
]
}
]
},
"Beta": {
"EnabledFor": [
{
"Name": "Targeting",
"Parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
},
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
}
}
}
}
}
]
}
]
}
}
]
}
}
9 changes: 5 additions & 4 deletions examples/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -20,5 +21,5 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
26 changes: 16 additions & 10 deletions examples/ConsoleApp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"FeatureManagement": {
"Beta": {
"EnabledFor": [
{
"Name": "AccountId",
"Parameters": {
"AllowedAccounts": [ "abcdefghijklmnopqrstuvwxyz" ]
}
"feature_management": {
"feature_flags": [
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "AccountId",
"parameters": {
"AllowedAccounts": [ "abcdefghijklmnopqrstuvwxyz" ]
}
}
]
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ namespace FeatureFlagDemo.Authentication
///
/// To assign a user, use the following query string structure "?username=JohnDoe&groups=MyGroup1,MyGroup2"
/// </summary>
class QueryStringAuthenticationHandler : AuthenticationHandler<QueryStringAuthenticationOptions>
class QueryStringAuthenticationHandler(IOptionsMonitor<QueryStringAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder) : AuthenticationHandler<QueryStringAuthenticationOptions>(options, logger, encoder)
{
public QueryStringAuthenticationHandler(IOptionsMonitor<QueryStringAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock)
: base(options, logger, encoder, clock)
{
}

protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
var identity = new ClaimsIdentity();
Expand All @@ -32,9 +27,9 @@ protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
string username = value.First();

identity.AddClaim(new Claim(System.Security.Claims.ClaimTypes.Name, username));
identity.AddClaim(new Claim(ClaimTypes.Name, username));

Logger.LogInformation($"Assigning the username '{username}' to the request.");
Logger.LogInformation("Assigning the username {username} to the request.", username);
}

//
Expand All @@ -48,7 +43,7 @@ protected override Task<AuthenticateResult> HandleAuthenticateAsync()
identity.AddClaim(new Claim(ClaimTypes.Role, group));
}

Logger.LogInformation($"Assigning the following groups '{string.Join(", ", groups)}' to the request.");
Logger.LogInformation("Assigning the following groups '{groups}' to the request.", string.Join(", ", groups));
}

//
Expand Down
4 changes: 2 additions & 2 deletions examples/FeatureFlagDemo/FeatureFlagDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="7.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading